aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-02-06 09:54:59 -0700
committerBin Meng <bmeng.cn@gmail.com>2020-02-07 22:45:35 +0800
commitd9a5fad80857005703d46b6ea27217baa17eb142 (patch)
treee7efd45c41f515c8355bc190701fde2f6f70c904 /arch
parent69c2dc937a53f4f35688c1289720625e002f3791 (diff)
downloadu-boot-d9a5fad80857005703d46b6ea27217baa17eb142.zip
u-boot-d9a5fad80857005703d46b6ea27217baa17eb142.tar.gz
u-boot-d9a5fad80857005703d46b6ea27217baa17eb142.tar.bz2
x86: itss: Add of-platdata support
Allow this driver to be used in TPL by setting up the interrupt type correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/intel_common/itss.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index 33962cb..b6b57cc 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -146,6 +146,15 @@ static int route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num)
return -ENOENT;
}
+static int itss_bind(struct udevice *dev)
+{
+ /* This is not set with of-platdata, so set it manually */
+ if (CONFIG_IS_ENABLED(OF_PLATDATA))
+ dev->driver_data = X86_IRQT_ITSS;
+
+ return 0;
+}
+
static int itss_ofdata_to_platdata(struct udevice *dev)
{
struct itss_priv *priv = dev_get_priv(dev);
@@ -208,6 +217,7 @@ U_BOOT_DRIVER(itss_drv) = {
.id = UCLASS_IRQ,
.of_match = itss_ids,
.ops = &itss_ops,
+ .bind = itss_bind,
.ofdata_to_platdata = itss_ofdata_to_platdata,
.platdata_auto_alloc_size = sizeof(struct itss_platdata),
.priv_auto_alloc_size = sizeof(struct itss_priv),