On 12/3/24 5:49 AM, Venkatesh Yadav Abbarapu wrote:
Add the bool variable "peer_hub" and set this only for the
hubs which have the "peer-hub" property in their DT nodes.
Skip the bind function for usb hubs which don't have "peer-hub"
property.

Fixes: 57e30b09fc ("usb: onboard-hub: Bail out if peer hub is already probed")
Signed-off-by: Venkatesh Yadav Abbarapu <[email protected]>
---
  common/usb_onboard_hub.c | 8 ++++++++
  1 file changed, 8 insertions(+)

diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c
index 6f28036e09..0a8fac38ee 100644
--- a/common/usb_onboard_hub.c
+++ b/common/usb_onboard_hub.c
@@ -26,6 +26,7 @@ struct onboard_hub {
struct onboard_hub_data {
        unsigned long reset_us;
+       bool peer_hub;
        unsigned long power_on_delay_us;

Move the bool here , so it is not between the two delay descriptors.

        int (*init)(struct udevice *dev);
  };
@@ -178,10 +179,15 @@ err:
static int usb_onboard_hub_bind(struct udevice *dev)
  {
+       struct onboard_hub_data *data =
+               (struct onboard_hub_data *)dev_get_driver_data(dev);

Is the cast necessary ?

[...]

Reply via email to