History log of /u-boot/cmd/bind.c
Revision Date Author Comments
# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 301bac60 27-Apr-2024 Tom Rini <trini@konsulko.com>

cmd: Remove <common.h> and add needed includes

Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 249a75d8 10-Oct-2023 Miquel Raynal <miquel.raynal@bootlin.com>

cmd: bind: Try to improve the (un)bind help

While it may sound totally obvious for the regular U-Boot developer to
get the parameters of the bind/unbind commands from the output of 'dm
tree', it did not felt straightforward to me until I was explicitly
told to look there. And even when I knew the command, I did not make a
direct link between the arguments of this command and the columns
returned by 'dm tree'.

Several of us lost a lot of time because of that, I would like to kindly
help other users by slightly improving this textual line. Unfortunately,
because of how this string is used (like within the 'help' command) I
cannot detail much more, but at least the pointer is there.

While we add this message, we can also imply CMD_DM when we enable
CMD_BIND so the debug message does not lead to an unknown command. This
way the 'dm' command will likely be there unless explicitly disabled.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20231010090304.49335-3-miquel.raynal@bootlin.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

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


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 38f7d3b6 10-Sep-2021 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: Fix driver binding on a device

Fix a regression brings by commit 84f8e36f03fa ("cmd: bind: allow to
bind driver with driver data")

As example, the following bind command doesn't work:

bind /soc/usb-otg@49000000 usb_ether

As usb_ether driver has no compatible string, it can't be find by
lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
the driver entry is known, pass it to lists_bind_fdt() to force the driver
entry selection.

For this, add a new parameter struct *driver to lists_bind_fdt().
Fix also all lists_bind_fdt() callers.

Fixes: 84f8e36f03fa ("cmd: bind: allow to bind driver with driver data")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reported-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: Marek Vasut <marex@denx.de>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 0b1284eb 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with decimal to dectoul()

It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@foss.st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 84f8e36f 28-Jul-2020 Patrice Chotard <patrice.chotard@st.com>

cmd: bind: allow to bind driver with driver data

Initial implementation invokes device_bind_with_driver_data()
with driver_data parameter equal to 0.
For driver with driver data, the bind command can't bind
correctly this driver or even worse causes data abort as shown below:

As example, for debug purpose on STM32MP1 platform, ethernet
(dwc_eth_qos.c) driver needed to be unbinded/binded.
This driver is using driver data:

static const struct udevice_id eqos_ids[] = {
{
.compatible = "nvidia,tegra186-eqos",
.data = (ulong)&eqos_tegra186_config
},
{
.compatible = "snps,dwmac-4.20a",
.data = (ulong)&eqos_stm32_config
},

{ }
};

After unbinding/binding this driver and probing it (with the dhcp command),
we got a prefetch abort as below:

STM32MP> unbind eth ethernet@5800a000
STM32MP> bind /soc/ethernet@5800a000 eth_eqos
STM32MP> dhcp
prefetch abort
pc : [<4310801c>] lr : [<ffc8f4ad>]
reloc pc : [<035ba01c>] lr : [<c01414ad>]
sp : fdaf19b0 ip : ffcea83c fp : 00000001
r10: ffcfd4a0 r9 : fdaffed0 r8 : 00000000
r7 : ffcff304 r6 : fdc63220 r5 : 00000000 r4 : fdc5b108
r3 : 43108020 r2 : 00003d39 r1 : ffcea544 r0 : fdc63220
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code: data abort
pc : [<ffc4f9c0>] lr : [<ffc4f9ad>]
reloc pc : [<c01019c0>] lr : [<c01019ad>]
sp : fdaf18b8 ip : 00000000 fp : 00000001
r10: ffcd69b2 r9 : fdaffed0 r8 : ffcd69aa
r7 : 00000000 r6 : 00000008 r5 : 4310801c r4 : fffffffc
r3 : 00000001 r2 : 00000028 r1 : 00000000 r0 : 00000006
Flags: NzCv IRQs on FIQs on Mode SVC_32 (T)
Code: 2f00 d1e9 2c00 dce9 (f855) 2024
Resetting CPU ...

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

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>


# 09140113 10-May-2020 Simon Glass <sjg@chromium.org>

command: Remove the cmd_tbl_t typedef

We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 49c752c9 09-Aug-2018 Jean-Jacques Hiblot <jjhiblot@ti.com>

cmd: Add bind/unbind commands to bind a device to a driver from the command line

In some cases it can be useful to be able to bind a device to a driver from
the command line.
The obvious example is for versatile devices such as USB gadget.
Another use case is when the devices are not yet ready at startup and
require some setup before the drivers are bound (ex: FPGA which bitsream is
fetched from a mass storage or ethernet)

usage example:

bind usb_dev_generic 0 usb_ether
unbind usb_dev_generic 0 usb_ether
or
unbind eth 1

bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether
unbind /ocp/omap_dwc3@48380000/usb@48390000

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>