From patchwork Thu Dec 31 04:09:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1421498 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=b/q28X1H; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D5vvb6GgQz9sSf for ; Thu, 31 Dec 2020 15:15:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CE7D826D3; Thu, 31 Dec 2020 05:12:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="b/q28X1H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 62DD48261B; Thu, 31 Dec 2020 05:11:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9F70182611 for ; Thu, 31 Dec 2020 05:10:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12e.google.com with SMTP id v3so16497213ilo.5 for ; Wed, 30 Dec 2020 20:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ThoMrjsI6ng5iRA6X5ySA4k9va5dCYE7xsd+xtf6EGI=; b=b/q28X1HDWwpMD8RGg/OAWeGKTc5lG6gxE8nY2bEU3kkZL6JMLTDJ0S9dY7Y8dPTf2 rHy9jXXGleM0m35yvRMEn8jklIdbn9JkQShbd0joNT6K6NmurXE7tSK/TtiZD2UVbyx+ I1k3KOhea2EWG/kuApK3Ru8HMH3CTGQRp64DA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ThoMrjsI6ng5iRA6X5ySA4k9va5dCYE7xsd+xtf6EGI=; b=AMJpZg0qUkw5PO+b3SDBuInSRotCroxkgaQFgeChx1E48N21uFZ2nURhbV0pw8H1Or 5BoR/6j6wSsvI8L7jiANNTEl5ZabaTuDg4GxZj/4xcHZ98vzbDwzAqx0Hztcydg/BF6O +BhJgojGsmU6UJTr2Menaak74vcoiNwtuounaxHSbQTFwHw68GQL2dPAbo4ih/dIMmPF fFKSI/rgDsQeW+t+3lNwCDSGqxd9n44SNricGvkXQ+6ISvmCX4M/qxVYTHPntPVlCLAp OdSo9we5ftHwDbh9h/121Kk5mDoH9JnwoCcXoEC2M7X6ghHeP4YufzVkr1eCEXU/+Z+Y YV9g== X-Gm-Message-State: AOAM531DPd97zydP6tnyDgBEojNrrPToS+mlPDkORW+Q+qR/Sep9RasW KxpGnum9uwLrD5CY5RvKERdXvvtgaOxPh4x6 X-Google-Smtp-Source: ABdhPJzUCEkKT2tiVs8qS5k4NmITNvRbD7i3BuY3kvhHy9kIkKJG+rRjWscZY/TOH2+e9T23RB1IYA== X-Received: by 2002:a92:5e9d:: with SMTP id f29mr56330516ilg.266.1609387850363; Wed, 30 Dec 2020 20:10:50 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id 14sm31959026ilz.7.2020.12.30.20.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 20:10:49 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Marek Vasut , Walter Lozano , Bernhard Messerklinger , Heinrich Schuchardt , Bin Meng , Tom Rini , Simon Glass , Wolfgang Wallner Subject: [PATCH 26/30] x86: itss: Tidy up bind() for of-platdata-inst Date: Wed, 30 Dec 2020 21:09:56 -0700 Message-Id: <20201231041000.660925-6-sjg@chromium.org> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog In-Reply-To: <20201231041000.660925-1-sjg@chromium.org> References: <20201231041000.660925-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean 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 --- arch/x86/cpu/intel_common/itss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c index ae4de4ca8c6..b258970e2ee 100644 --- a/arch/x86/cpu/intel_common/itss.c +++ b/arch/x86/cpu/intel_common/itss.c @@ -152,8 +152,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;