x86: itss: Tidy up bind() for of-platdata-inst
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 04:25:47 +0000 (17:25 +1300)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Mar 2021 04:03:09 +0000 (17:03 +1300)
With the standard of-platdata we must fix up driver_data manually. With
of-platadata-inst this is not necessary, since it is added to the device
by dtoc.

Update the code to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/intel_common/itss.c

index 588a512..1eff030 100644 (file)
@@ -153,8 +153,9 @@ static int route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num)
 
 static int itss_bind(struct udevice *dev)
 {
-       /* This is not set with of-platdata, so set it manually */
-       if (CONFIG_IS_ENABLED(OF_PLATDATA))
+       /* This is not set with basic of-platdata, so set it manually */
+       if (CONFIG_IS_ENABLED(OF_PLATDATA) &&
+           !CONFIG_IS_ENABLED(OF_PLATDATA_INST))
                dev->driver_data = X86_IRQT_ITSS;
 
        return 0;