diff mbox series

[v2,11/17] x86: itss: Add of-platdata support

Message ID 20200204001945.234347-12-sjg@chromium.org
State Superseded
Headers show
Series x86: coral: Add support for Cr50 | expand

Commit Message

Simon Glass Feb. 4, 2020, 12:19 a.m. UTC
Allow this driver to be used in TPL by setting up the interrupt type
correctly.

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

Changes in v2: None

 arch/x86/cpu/intel_common/itss.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Bin Meng Feb. 4, 2020, 8:27 a.m. UTC | #1
On Tue, Feb 4, 2020 at 8:20 AM Simon Glass <sjg at chromium.org> wrote:
>
> Allow this driver to be used in TPL by setting up the interrupt type
> correctly.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2: None
>
>  arch/x86/cpu/intel_common/itss.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
diff mbox series

Patch

diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index 33962cb9a0..b6b57cc9a0 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),