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 7A2D9C4332F for ; Mon, 17 Oct 2022 17:13:52 +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=xnd4mArLReykPC 3rWWAN1tvkEG0yhFUlmAGqTEb25m4aRm2OG4SvOa4weRzW5qr6Xua9ai+CxUEgSCF90S9CcTuJmGm tUfxDAu6IN/OqPrsd1zZmol+cyPhanCtkfuDIYUZ3elQ5IbAQkccTPqIIseEh7Tb00LYWOPoQOQNj B3P9oxRvwYgGyY3M68kqASAfh3ZVCs1NO4ec5wof4RDdh47raaDlPtmX6GdJIsk9dTozhxIui/ULL sOnbRZ3zF284AYgF8TcbA7ABlPwxuZnr6VQM9O6VLU+CwY6ZSwPb6x8JtrRqUOYTStdhyGZuQugm7 rXRXmc4FQVaBuAUvyXKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okTfV-00DuyT-QT; Mon, 17 Oct 2022 17:12:49 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okTfF-00Duro-38 for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2022 17:12:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666026753; x=1697562753; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hWe3aaoOgf+xq5Pq0douiTL3qv6/yUoCMHsfExvmaKw=; b=AyqGRd0mbtdkYuKB9K9EzTci14xtiSDAjwaGxUe6qWHpc3eNulFdnDaS IHhuoYE6eOtNP3BAgaU8V+8pfSiOnNg2W5gicKV6hROg5JhX4tX61Za21 Cu/xrnVV65/HPfRhxwE4KSjISozLiOfTvX7XsiEpHyzakGBAQ/pXH532u W3GTRRWbu3T0NtWU5AdGIeMQ1n8SdAwz5NYRtLbIIRGJziC8kz/IeumRc /CN3zAjwKKvk7TxJXjjBsBWKqlh8J/7hlM6tLhJMP3tRfK9FyC9qIbYzl QGgnVt5dgiPqkOxwK7xYF4L/lFHGMZm+iegopWVOr9bvjNlCOhrtIqHYv Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="303475668" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="303475668" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 10:12:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="957417116" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="957417116" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 17 Oct 2022 10:12:27 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E7641291; Mon, 17 Oct 2022 20:12:48 +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 v1 2/6] spi: pxa2xx: Respect Intel SSP type given by a property Date: Mon, 17 Oct 2022 20:12:39 +0300 Message-Id: <20221017171243.57078-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221017171243.57078-1-andriy.shevchenko@linux.intel.com> References: <20221017171243.57078-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-20221017_101233_172622_75603A19 X-CRM114-Status: GOOD ( 13.51 ) 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