From patchwork Mon Aug 7 15:53:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 9885665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F23E360363 for ; Mon, 7 Aug 2017 15:53:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3F7D286BD for ; Mon, 7 Aug 2017 15:53:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8C3C286BF; Mon, 7 Aug 2017 15:53:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 489822867E for ; Mon, 7 Aug 2017 15:53:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbdHGPxl (ORCPT ); Mon, 7 Aug 2017 11:53:41 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:34152 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751869AbdHGPxk (ORCPT ); Mon, 7 Aug 2017 11:53:40 -0400 Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dekLO-0006g3-30; Mon, 07 Aug 2017 15:53:28 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1dekLL-0005aP-FQ; Mon, 07 Aug 2017 16:53:23 +0100 From: Mark Brown To: Arnd Bergmann Cc: Mark Brown , Mark Brown , Andy Shevchenko , Mika Westeberg , Daniel Mack , Haojian Zhuang , Robert Jarzmik , alsa-devel@alsa-project.org, Kuninori Morimoto , Geert Uytterhoeven , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org In-Reply-To: <20170807154409.205269-1-arnd@arndb.de> Message-Id: Date: Mon, 07 Aug 2017 16:53:23 +0100 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Applied "spi: fix building SPI_PXA on MMP" to the spi tree X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch spi: fix building SPI_PXA on MMP has been applied to the spi tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 128345b13d9b6a84d12f6b3c478e70acc21a96ac Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 7 Aug 2017 17:42:55 +0200 Subject: [PATCH] spi: fix building SPI_PXA on MMP When the audio driver selects CONFIG_PXA_SSP on ARCH_MMP as a loadable module, and the PXA SPI driver is built-in, we get a link error in the SPI driver: drivers/spi/spi-pxa2xx.o: In function `pxa2xx_spi_remove': spi-pxa2xx.c:(.text+0x5f0): undefined reference to `pxa_ssp_free' drivers/spi/spi-pxa2xx.o: In function `pxa2xx_spi_probe': spi-pxa2xx.c:(.text+0xeac): undefined reference to `pxa_ssp_request' spi-pxa2xx.c:(.text+0x1468): undefined reference to `pxa_ssp_free' spi-pxa2xx.c:(.text+0x15bc): undefined reference to `pxa_ssp_free' The problem is that the PXA SPI driver only uses 'select SSP' specifically when building it for PXA, but we can also build it for PCI, which is meant for Intel x86 SoCs that use the same SPI block. When the sound driver forces the SSP to be a loadable module, the IS_ENABLED() check in include/linux/pxa2xx_ssp.h triggers but the spi driver can't reference the exported symbols. I had a different approach before, making the PCI case depend on X86, which fixed the problem by avoiding the MMP case. This goes a different route, making the driver select PXA_SSP also on MMP, which has an SSP that none of the boards in mainline Linux use for SPI. There is no harm in always enabling the build on MMP (PCI or not PCI), so I do that too, to document that this hardware is actually available on MMP. Link: https://patchwork.kernel.org/patch/8879921/ Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown --- drivers/spi/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 9b31351fe429..f9f9b0940746 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -518,8 +518,8 @@ config SPI_PPC4xx config SPI_PXA2XX tristate "PXA2xx SSP SPI master" - depends on (ARCH_PXA || PCI || ACPI) - select PXA_SSP if ARCH_PXA + depends on (ARCH_PXA || ARCH_MMP || PCI || ACPI) + select PXA_SSP if ARCH_PXA || ARCH_MMP help This enables using a PXA2xx or Sodaville SSP port as a SPI master controller. The driver can be configured to use any SSP port and