From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64EBCC4332F for ; Thu, 20 Oct 2022 16:28:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+nLaSJGOPM/i7eJvtXecVoZcN/6ZFGIVoqw16X5Uk7Y=; b=CMvwPyic5IM4S+ Az2/hYuWBlaQfJahVpsptBPqPXlC0tOpaYqxH15AxES2xHJkVbNNQQRIJX7ffT9tJWZr3mOANxk6I coM0VE6VBBYkB1UffrKfdfw9KFLftp2ew58TQhZXsV4dFbn1/JnvZHtdeCZgk9xp5dtI5aFO+effj JnSvmttxJw3BCBs+RVfEMAlypvV5XQyTuq37u/Gw4+cG2PVD7ZDNsGMqaDmE2P997OBD0d3t3wXfg ufl5T+gtDQbsy3RV7fVu391QTxZgKEh5zTkvohzDiU976HVqmrb8IysHUJpVQ5knnx5MFDyWwaqcC 9cYiyVQkOM/svmtcIpXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYOg-000JtK-I0; Thu, 20 Oct 2022 16:27:55 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olYN9-000J7v-8V for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 16:26:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666283179; x=1697819179; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hWe3aaoOgf+xq5Pq0douiTL3qv6/yUoCMHsfExvmaKw=; b=CVes5yyVdAecKa062UYyWEy2iPYGShy6PPJHSAmzT+WM5tFRpEOBH5xU hUuZ3YEjOt1u+Cl7pEAkCnMteZj1r2qITerGNs8AWjDi/LGIWeBHwbwwF CmihVOVMwFegj7+Sel5mf3lLWbZWjK6nOFY2lKIJ4cUmmNvPofumnB2RM 220gcfTqutfR6GcxNo47unzHQMBTv2OHpVsY2SNinIKwNA9HPftAJ+Cxp LRqwN4BP4Uw6fjlME+RlHXOy0gO8X5L5PI0TQMRj79trh/D/5DMIy2JYq qC7cJZIs2tG+D7v3cVD1VZPbGr3lVWCvTipuWeFlfV9ONt+VXpsasGfzY Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="286482341" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="286482341" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2022 09:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10506"; a="581004361" X-IronPort-AV: E=Sophos;i="5.95,199,1661842800"; d="scan'208";a="581004361" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 20 Oct 2022 09:26:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B1D504FD; Thu, 20 Oct 2022 19:26:32 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown Subject: [PATCH v3 1/5] spi: pxa2xx: Respect Intel SSP type given by a property Date: Thu, 20 Oct 2022 19:26:27 +0300 Message-Id: <20221020162631.68914-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> References: <20221020162631.68914-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221020_092619_412407_4E458D33 X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Allow to set the Intel SSP type by reading the property. Signed-off-by: Andy Shevchenko --- drivers/spi/spi-pxa2xx.c | 6 ++++++ include/linux/pxa2xx_ssp.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 03ed6d4a14cd..857732a54ca7 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1460,6 +1460,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) struct resource *res; struct pci_dev *pcidev = dev_is_pci(parent) ? to_pci_dev(parent) : NULL; const struct pci_device_id *pcidev_id = NULL; + u32 value = SSP_UNDEFINED; enum pxa_ssp_type type; const void *match; int status; @@ -1468,9 +1469,14 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) if (pcidev) pcidev_id = pci_match_id(pxa2xx_spi_pci_compound_match, pcidev); + /* Always try to read property */ + device_property_read_u32(&pdev->dev, "intel,spi-pxa2xx-type", &value); + match = device_get_match_data(&pdev->dev); if (match) type = (enum pxa_ssp_type)match; + else if (value > SSP_UNDEFINED && value < SSP_MAX) + type = (enum pxa_ssp_type)value; else if (pcidev_id) type = (enum pxa_ssp_type)pcidev_id->driver_data; else diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index a3fec2de512f..cd1973e6ac4b 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h @@ -229,6 +229,7 @@ enum pxa_ssp_type { LPSS_SPT_SSP, LPSS_BXT_SSP, LPSS_CNL_SSP, + SSP_MAX }; struct ssp_device { -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel