From patchwork Fri Oct 18 15:41:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176891 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1033733ill; Fri, 18 Oct 2019 08:45:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHtiKyuYOoisre4qfLbiQyXkParAwRd1KZJOWXEzN4zv4M+XTfdV9tc1xzbdJ83CUN62DB X-Received: by 2002:a17:906:fcac:: with SMTP id qw12mr9153790ejb.31.1571413537620; Fri, 18 Oct 2019 08:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413537; cv=none; d=google.com; s=arc-20160816; b=rhqxsDOQmt3vQb6bEH2yKCOyt+6oxqt4Xn3V3TpEdy5eMGm2y93vo477XxMgYKewfD hbbTrIcTSNX8kB93nxMNCu61atuWiyzNLaVv3guhZciXinWQdYIpK1VBtfBn4GXHcmTi FJH+/njEfxkJgLSuuPdCooscsRBuSPlQ2MT3BjLexXc3fYPpkHEj4tDWmfl+T6mcxD/L CQpG0OYQ6rV4fgx9KoCMTen3A+c86UrmBYnCdZrs2N5LWtGzjKF4M6z4J5JoZVquiF1M 7H7c011EhO7ZnzxNFVKi5ZIO8Cx+V3BjnJghKoA86cRwjNsxa5xMSUMW5TyCPauFdDkO UvZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7esAuS9B1CeiJHISC1IOGl3q5mWPrAP/1VkJSK7gZ00=; b=YaKZhOMPTNKqOq78tXD7UczWmNByZGiZkMJVS6a56w8DjPzpzRzj8Hd73vYkNkmKhN dEAcQe30WshHNXT8fAPTcxBiO1u9oq1BTHez38krwzkLPCE1g/etgGP3w5Ny+o3FwMny kLSxcuoGqE0Z/nEdWJxGMWTaV0bi/W3uIG4xp+2HPeWJYqiDAalIqbXZUFXOGQeLwXgZ NKlgiVuIaXSyohIQYkXvsZ2lD8k86BDKLM9qhLYgjR4hrumZ4lf9Artm5sKZsmvKBMmR bvQljGu+epe/V0mEMostYQ60KnQGN0DJKRMnl91t2ssbvsgbpVcISDo3T1SXg8lYTH10 nd4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be24si3967733edb.120.2019.10.18.08.45.37; Fri, 18 Oct 2019 08:45:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408864AbfJRPmY (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:24 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:55249 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728464AbfJRPmX (ORCPT ); Fri, 18 Oct 2019 11:42:23 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MMGVE-1iefOy3vpW-00JN2x; Fri, 18 Oct 2019 17:42:15 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann Subject: [PATCH 01/46] ARM: pxa: split mach/generic.h Date: Fri, 18 Oct 2019 17:41:16 +0200 Message-Id: <20191018154201.1276638-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:iVpqPa86ze0iu6OOhejjP0amJ+TBDw2xGngL1judoPmHRjZqhrN Q8EV0/l37SyeJE75D3N0sPgmWDWfWo3kfjx4Em1fWmC+AqabmnYF6cwMs7AEN7c0tR/Z5mh 8hLOuC4xixrHLW0YeCu/YYym6BIPrIMwr7Df6OMgqkBrdWo/qM7oNnqRHAo4wN3I/zLbZ7L GlXM6ZyWBP6LsF4XfIoUQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:zZptb6vq8zo=:s2X4MeHnHk9Lnsa8+6HPrv 5iWkf8Ogxx4F2D5bQeqlIN8hnoKsIoke3kROPXtoWwAsgN/Mvgphi7O/1KVM62gqsVXB4uBUq QScfAuVc2CZ8xiei7BMhcnHUazOJG3tNXI+l3CA23fFXlmrtEoGJFSw7F3afJCgl54UtHmx1Y /QZwSwoVo+zjXlpLxNICYSt6n12AlFt7HVgkbM+cjj/vAyBXQ/MlU7ZKro7bzSGMnFdRoMZ6X S7KUITNX7C/e0OKxkdy1AvOGTsASKLORorjb813zTf7ZirNfGUVdVB8LFP4Oifzxsbdl0wlS2 tp2deM99n2HYbQGZgO1zR++T4iQF1CEDbEIEXWgOZSAA7lkPX1Tbf26l/N81xs+t7hNSVG4TJ piwFW1fo+7M2TZTvATuN0iDJKraGYum+IezXddTa6eU9/peK9Fkz/fJ9K6qUxoqNXwU7/pjBM oGtM+XLr4s1dng303bjLH5TV8ajpR7SjpVzxKjsQ6AvXTtShp7HwFRuVKp+dzBFR0PH3APhrl Cpcj12H0cm7Vtxd0vSgQ7e/DMMPkvB4+EDK4hbt25MW/1D8kmbtYRfk9GLIYY9Ta9YeRnmRNp EuOovsX75bzAy/WY4EoF74EwXpdl2c7uiin15oWo4LEt9InZk6pmuik6LXXy497IMjsqj40mY zlsta6/sLUIXNSauSAtsxfxGLDT8OuDI2WCpjkqz+6KfWEFuo5zL+fg98GPi9rZ1f3TXecJSk iXuMvRUEQWgcI/3gT54guvIEuitSDyehDWK8KwzHQApnkVzUZ3+7Bk7RiVdIo5+nbAtyviXKg tDd30zvyCrWdDSoLe8op6L0RmbI5nySrkijI9JvuFREP81peEn3MoVcf/mfB027BdZBk1QpYk nNMQ503PoGBx79gW3/zQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only one declaration from this header is actually used in drivers, so move that one into the global location and leave everything else private. Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/generic.h | 6 +----- arch/arm/mach-pxa/include/mach/generic.h | 6 +++++- 2 files changed, 6 insertions(+), 6 deletions(-) -- 2.20.0 Acked-by: Robert Jarzmik diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index 3b7873f8e1f8..67925d3ea026 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h @@ -7,6 +7,7 @@ */ #include +#include struct irq_data; @@ -71,8 +72,3 @@ extern unsigned pxa25x_get_clk_frequency_khz(int); #define pxa27x_get_clk_frequency_khz(x) (0) #endif -#ifdef CONFIG_PXA3xx -extern unsigned pxa3xx_get_clk_frequency_khz(int); -#else -#define pxa3xx_get_clk_frequency_khz(x) (0) -#endif diff --git a/arch/arm/mach-pxa/include/mach/generic.h b/arch/arm/mach-pxa/include/mach/generic.h index 665542e0c9e2..613f6a299d0d 100644 --- a/arch/arm/mach-pxa/include/mach/generic.h +++ b/arch/arm/mach-pxa/include/mach/generic.h @@ -1 +1,5 @@ -#include "../../generic.h" +#ifdef CONFIG_PXA3xx +extern unsigned pxa3xx_get_clk_frequency_khz(int); +#else +#define pxa3xx_get_clk_frequency_khz(x) (0) +#endif From patchwork Fri Oct 18 15:41:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176847 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1029794ill; Fri, 18 Oct 2019 08:42:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbagF+9LAi3VpbipAj4MvAyV0OhR23luDwBL0GsjsR0KXMKm09UgcuQp3xeRncDBrWV4Cv X-Received: by 2002:a50:b723:: with SMTP id g32mr10332314ede.13.1571413354147; Fri, 18 Oct 2019 08:42:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413354; cv=none; d=google.com; s=arc-20160816; b=zVsX6qmo8f4QKNtaF3uaeR7NZlu+bvNaM5Nu4n+2DAeYgF/v9B0vm/OeZS2FHxFLCm uUnAGLMmkCZd1y5p+7boOcnH7iYV/dFlFFbAD1pfBBOXDBn+F7t+A9YLiCpoM0PxaazY 8BsYwUWvE8GIDvlcB9o0aX/qNAKlVyg6nOjSc+8bdTLKgXsgxDha05ingY5OaM2dIei0 HJfK8a6pyPeiXA0w7OWNZtOOin/6gJcDbxkNd3i7K05oL0F0NHcg0rE4vFicfQZ0/C7M 6VE2luBZWizwXa1+5BkuvMIUbeREB09X52cszp9316d2miESQg3rJtx+Q9/Pzvv434Bl Kgcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=36lytE2SnrdGrWMpaQZbZBznzdT16QMqrCzs9l9c22g=; b=moYfLLPZHrP6SvsOW//uy8Y4EKM7aN88WMZ+r3df+Q0oYimPvFulvef8zHcsc/lQPX UhGFcXhbYe46dnRA0Vn2d+8M2NVe2dTZryb17oXE8v41wKMNZhJJlFzClWur4xt1LNFG K11FHvjiyJ8pF2IFLlo+8BHIXqxqiE4cNwTzBzRXcFPVBVdUVF/tBm4c0cxUUuOi6YOo 07meeyF7bFaJPFI1sTgQgkR6z/brEQyh2TGfiWMNDV3ujAIIbQ7bFtjrorgDTevM7JZw g9fbUz2KwVsp4q/ycmZvEhkRWDWIBgn2UYjC7M/4ZUfXHzWb4Jxfy1Am6VyIk4Ka5XWz zOFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si4140530eda.285.2019.10.18.08.42.33; Fri, 18 Oct 2019 08:42:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439667AbfJRPma (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:30 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:33891 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405757AbfJRPmY (ORCPT ); Fri, 18 Oct 2019 11:42:24 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1N4yyQ-1hw0zj14Bo-010v3h; Fri, 18 Oct 2019 17:42:15 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann Subject: [PATCH 02/46] ARM: pxa: make mainstone.h private Date: Fri, 18 Oct 2019 17:41:17 +0200 Message-Id: <20191018154201.1276638-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Udhcyk5JTS+ruoRMUBkQ73+mMSZy0d6F8odqYEMh7EWVHlDFzur YAEHqgrq+6iEyuzDWfYlOEdN39pwhvaBUi+HBb9kxUqrvfJlTjXn855pEb+7YSKgIprottH MbhG5NkvUIaQ0ECtq/JAjNi+AVRlCOLCRx/ZN6koBpNCOTmwQ3P79YeKdno98qrVG5s8Yi6 Y3HbEZGQiC3QS33gy/aTw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:w/pvqB/8ZjQ=:HM9Y+saKdz/Ra2pTCD68uI ez8gWpTbJGikKnT+7vjNu9KlZgCm57FRFctO5LdaDPs/nfVNYJNQpv7I48UW+xU1bdTTiCGSL mFjuUrBG0wfWKCNSuywhTdM6U8rNyteawBB0kUjCJCmYTfosBm1iXOEYa4ETxDLT6z557dg+g oLO6yuYuJNWtH6sytz0F9v1JvwrhodqorHtNdsqVeH8RHGTkjGP7krcBCsok9WFVttCRsX1mC gjaLi2849Qu9qm/F9H7yWcqfP4iW1axKXxS7q1E1zKAxPdfO+pT0H6xKae62ZvnFU6wCIQQb8 bbEd9cgwOoH8fWDKWFdtAwEt1rwwW0RBGyOCtIhDiUpYvOSNOR/lh5mWAQDc42rndghO/ocLc hErANl15R+1R+4kNCIQOcSa4YGZbDXhd6Xb8ocWo53R3S0yINI9lHY6NZ8xId9Xum+2I8NK/C DlZj6hiZ9bWV6NP4w9b6XfqYLlNNuYNMGWG3t0U45GN36HGJAa6HoxfMm144/sflj/wYW7r3S TrFjNe451sLWiNeY1NzlJxUUf9TQMPcjPIjtjfUnPKDIT0xNxz9TE4snvpy0cDh7Fr863oKqd w9YmLnRJhTf2ldm3UMtodbPAcivqYyW2fje4RkW1HT2u8ipb2JzMJQSzdoku4KKysXxlBg46f A23w7eririCR+9cZllRIEIMUHtOHYAHIbGC+dVwjPBGLvV5mxeXYNDJXODUL4exuOiSPsTCyp 8xG2F809Az1b8mmfrswFOqZofNtU0ZKWSMcR0hyWyuR9FWJjpEu+I7AIJnD/iIp8W1J4DUWNr dcIObRIUANNlFD5FFVkIzNXzCfFep8CNEMJEahXFxTZ3HOr7Fu0FO+zgCIx9Ho2YG9lyfT9ny iTsG2Rj0l1hzZUzZhrEA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No driver includes this any more, so don't expose it globally. Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/mainstone.c | 2 +- arch/arm/mach-pxa/{include/mach => }/mainstone.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/mainstone.h (99%) -- 2.20.0 Acked-by: Robert Jarzmik diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 1b7882920164..ef79417ca001 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c @@ -45,7 +45,7 @@ #include #include "pxa27x.h" -#include +#include "mainstone.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/mainstone.h b/arch/arm/mach-pxa/mainstone.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/mainstone.h rename to arch/arm/mach-pxa/mainstone.h index 1698f2ffd7c7..ba003742e003 100644 --- a/arch/arm/mach-pxa/include/mach/mainstone.h +++ b/arch/arm/mach-pxa/mainstone.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * arch/arm/mach-pxa/include/mach/mainstone.h - * * Author: Nicolas Pitre * Created: Nov 14, 2002 * Copyright: MontaVista Software Inc. From patchwork Fri Oct 18 15:41:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176845 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1029645ill; Fri, 18 Oct 2019 08:42:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqynsTzIVwC6mEZ4GT495GZ5CTSAKbU7+OvRkjFb7C2c9PRUbe4qRoMhC843/a48d47CVOfl X-Received: by 2002:a05:6402:21e8:: with SMTP id ce8mr10446723edb.32.1571413347459; Fri, 18 Oct 2019 08:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413347; cv=none; d=google.com; s=arc-20160816; b=Vh078gAkMY7cSZQ6M9qtvzJN5/yUOvx//w/kB+FDUbcQyTs1sHoLi67t9xXME5o3lx SEWQgdNgUhWBX/n9IP555vdWLxtZ9Qm4LH6HqkFR2pCYedoIUgIp9PUVQsEUIn9BNHgG 3S21+rkNk4vOf3DsRhWsKkx9woN6frnXzunBZfAnC1nceo9/7QxsHAnNWof0YhOEE7HW vYiWMlQ59iFiA959VUiuB/u9dDGrTAZTGnEXWxSEJ1EIj7nkbHRFTaajDaORm5giV56H dWDFk5TFtDqVIh9YllrTAhOHo+ehEJ80bGCgCxuhGPEVaMKMwR3ZLR/JYnQ5S6FIsSLc zgZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=V2Mk8ZpwQ1THLGONYOH4PxvE07ZvCsfZD/cqI4XEihA=; b=jz9okhQCwbWYDZbl9QOGRb1JvHVZ5p6sJ67WHBrYr1eQiU8rRkLVG+E8CwX1baLae0 vEufW/GjfojW3HyD77KL13DnjCzVD8sN6iHecd5hRPyS0ymDeSTyvFUWmrB3pRMOXqo7 tnralKOgPP0j1Gj0YpK1yFQUuIYcczzcVy+l35Nc6BOYpxjQesJKqh0CnBZAMgFwYGCl ylq0+qeWqfoWJzfMoxpe/FLDIxKZAljT9d2Cn9CU70OlEdcLvMpEMwJp0jxRO2EfD/0L rYG5xyfqSgA64ppJjVLGIFwLUpxku8DUZJyRx+HVsdGSM3bBQpg2l4/5V/M7lSQRseFh SA1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si3961891edq.49.2019.10.18.08.42.27; Fri, 18 Oct 2019 08:42:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408885AbfJRPmY (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:24 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:57303 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405905AbfJRPmX (ORCPT ); Fri, 18 Oct 2019 11:42:23 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MEmEf-1iFAs82Qix-00GEsw; Fri, 18 Oct 2019 17:42:15 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann Subject: [PATCH 03/46] ARM: pxa: make mach/regs-uart.h private Date: Fri, 18 Oct 2019 17:41:18 +0200 Message-Id: <20191018154201.1276638-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:VWwIzXDORj0a17r+gbKmSAymG/HQiOvLGrDQVrBqqaWyL+kaOFg kz/BJmNkZLMkdXDKomnkUST9RFEVbMmw6Eueu5P+bdIyhmsH0wU6iN0HDnZJnnUUQ+CulUt cr9pOSXAqqpiwZVxzmTr09E0aSD/9to7NowPy3VMmmzQYJr6fKEAh49hfq2lNpA5IE72OEh ac2JWwNOlJTux1MJ4zDZA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:/9qNABDzT9Q=:/tbjJ7gi4/f1W3oXPMyS65 t2hHmsMewJ1IVUSpoCtphMBiTAfDZ5k6gRVR7IEp9xJKuUZBACPp6kJdUhqLqh88JQD/a2gtg iz1qnCzCXWtRnbb+qDkp/QeXI6JcZfCpQpdj9P/5JeMSghhR8faRhlm8R63L3iasM4I/sV3FZ ZlQOG/ushFXRsWFFTlQlMl/QHfQYaUVFndu9gGGoOXZwTXyGxGr1KGGBIh6rw3g8iwvy897ar oPGsZOwKoPl/JHwGAVyyYH3fQnhEEQQ+sv0EUARnv2NzQ0ouafuzb5LZfSBwmGQp3p0MvERXm EgE6olH+Hw3smPyjR9Uf32YAg1v9W+JpAAHu6vkIb2DB8J9Zq+B18dQuBG92Mc3N3o3ekDzJf r/jvQu97uAeniUDlMwYAc48KbAq91fyjyizPo37FhMvXb4zFIKN7iab6eEOJY6NFaQxgwzZex nkTJ8dnUvJszqUF9gxUadvFEsa/XE+6FZDPsLRtLg1BEeXxNQ65/bV7J7KCZstM4OrkNO249Q ILOiKPYADMqu8UeTCSeWXKbuOScVVA0YDYUXZo9j1YNfmH1IWmJ5kwYPZtGDotdf+rtn+6k2G tix2SNmbuVnrrdWN9HSFVDdCMNGOPuqHu7iVd0BUWYk90uk0YyKs9bt1inwPi2DAy84y4lmJB dJCqWR89UrPxF2LD2SZGT8KipgcqMJFA0CW0vnNX7LWYYhPVQvmmVjRYfpdppqSPxJq8C5mPO MMfyKDCdIHggXOXafhxAja4preDaRQH0t9+ZItblLfGeIROXMtwfNxbCiPRth6zfLqZdpDiZg U9HQ0aoRePdmEHETkgA0aHmLwSq6A+wxCeejah1G1lm5fZ557Tv49Xb2h8T7tb9LrV+aVfN2I GokFR5JCL4Z6vWXFvfTw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is not used by any drivers, so make it private to the platform. Signed-off-by: Arnd Bergmann Acked-by: Robert Jarzmik --- arch/arm/mach-pxa/{include/mach => }/regs-uart.h | 0 arch/arm/mach-pxa/viper.c | 2 +- arch/arm/mach-pxa/zeus.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/regs-uart.h (100%) -- 2.20.0 diff --git a/arch/arm/mach-pxa/include/mach/regs-uart.h b/arch/arm/mach-pxa/regs-uart.h similarity index 100% rename from arch/arm/mach-pxa/include/mach/regs-uart.h rename to arch/arm/mach-pxa/regs-uart.h diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index c06031da6676..16f33e576902 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -48,7 +48,7 @@ #include "pxa25x.h" #include #include -#include +#include "regs-uart.h" #include #include "viper.h" diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index da113c8eefbf..239faff71a1f 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -39,7 +39,7 @@ #include "pxa27x.h" #include "devices.h" -#include +#include "regs-uart.h" #include #include #include "pxa27x-udc.h" From patchwork Fri Oct 18 15:41:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176846 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1029701ill; Fri, 18 Oct 2019 08:42:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLsMa1f9O3nDzwVbDOrEYTNB3VhEAlIO9O5129ZdPlQTr9EjBWqHBBHgWYW4D+C6aToTNJ X-Received: by 2002:aa7:d2cf:: with SMTP id k15mr10129047edr.208.1571413349776; Fri, 18 Oct 2019 08:42:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413349; cv=none; d=google.com; s=arc-20160816; b=pVlt0kV6YeggMsFdrxtuGd85csDIWyxw+d3evrpDAQcbEPKu/WA8cfXsturWKWS9a/ Mg7IwG34U4UDqLEBa8i9eMOnAcaqMVA3PRhEnKDWlseFmKFrpnKgCH3Rufsi9y2F0lCq 17KbbCOpRRtD9cuZZbh7+WOydFV25RRV9VVC0PIIpfErhHsrXrCV0OSi/KioDAs0Wcfn Drhsv3mgL0FF/iRu/GGSNVgcvtgghBhN5x2Q6+OiEGVQ90PiTkPEwW3xvq0bLUnUrPkY /ycxnHmOv3KK65APJMijF6hvEv//5/YnpA4DnlSaoL7QOM0W57gGeora7O3+Uz3ZD27I VIcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DbGaYKZ0g4fibyqtCaVLFFFOP0gcCGAthQIi8LAJrx8=; b=tQUelZ61ylBNvwofEOT0gu4dQsjpXVTXKFS//j1Yhfls98dy0DhwXFWkBNljYSawdL QLvvIfAZ4C8Fns89t7rzR8rM31LJZt7uCKwAQCMGBvPGnQtchUodAEi+mBnpjH+nPVHR a9JoNnsQyzrAjmUEhOxqXsZjLHiVU3Gi7kgp19MQ0NSFv+rhXmxIIP/bTRbHo5mTPdb0 oan8ki4vczyo25K+DwnATaaavIqyHFNJ9Gi0d4IDG8VeCUA2MtEsyb6ZZWPnumGXl2t0 0UfZNGzDF4quaH4RXyvpjGxllj+hCADVQZjdGcKwOmUxWgxGQrfFu9c5boR5X/QAQDJ1 +8rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si3922735edb.258.2019.10.18.08.42.29; Fri, 18 Oct 2019 08:42:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439454AbfJRPm0 (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:26 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:59491 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405999AbfJRPmY (ORCPT ); Fri, 18 Oct 2019 11:42:24 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1Ma1sQ-1iZjSV3XfQ-00VxxB; Fri, 18 Oct 2019 17:42:15 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann Subject: [PATCH 04/46] ARM: pxa: remove mach/dma.h Date: Fri, 18 Oct 2019 17:41:19 +0200 Message-Id: <20191018154201.1276638-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:8TEqedFajmaipFY2tALtoA/H+jJS4WGpQwTgWuusrkdQdWHNuVO QHvjOQ4t25vRotVV4diXErGEasck7HPqDt6GpHFVkLvbEkQI+GQfET3S70RAJlJ5K7xsDIi /JT/MsSzBXoGhIGkufaKffAh8a17LrK65QrGP4ZpZbKh7bA1Ort3DvBZtCaXSC1MXGnBqt3 5FBjuSCJqE3t835Fuk3MQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:kDHsLqbViLM=:gdEcYHN+QBvHq7vlsT8h6G rIGd6V+0LqTPOWZ6S8hgGy6fTAJ9F+Au3XPG297KTnq1+aFW5sQYcApZGnbJ1jZS0+uu3Ob94 e+9lO7+WV91QDbE98EBrF2cyskafdp61gdsu5juu6ftv8zntJY+yekueOHIxuVv0Yf4Y/JU1I RjqKLsjpmwFxd/I5qWCD1dkoWf0VtZ4knKajUzn3q29TRQVzo+wBFdTqMGQqqohV1Cytr0dD3 JPefTEm6jjbPHLWeEVDypxmcKqVhIO3N/tsyjL8nZ7wAt4v2j+1GBwIjbh0jPWo6OhKbT2a4U /1LT2dw6P9NkGtt+y5nAY8EI4h64/6J68WWEXEJTHHHv2SxvfDmvtMI4VxQZpG+8ef8d9p+xB AeNwwEL1RbXk2Sddurem0eI9PxLCuUp39I6pfqtM+Ex7cYJRQ3QRIYiIVZCbcEHAh786NnFS1 SncuqkQw7EGspdXOrtLuWW2F0TCLr5J+7sHEi0ZwnHpSNfD/rePdvKuYUc8X3JfuiwWhCnzat 2QLdJtVCU8AL7d3Co1C0HT83+6TKe3El3M7XuobMyWR5EzRo5ip2fDa4LCmncPmEWQWcoid34 4WyuYIvBlxAyUDfs062cMD2fu1lds1u+VojAv8md1lmUaluuIYmlhP59anUkliu5WP0HVcOec 84RHI7NAlxnngv1AOhBBBJuKSJD+mYu/cfchkesOXCMWwY5dz1ZKibB2cdI8SPgk9muZ6zHtz 4nknnkZv8hGEV1y0SUNEJt4DxFJX4ldHLvLTAJ7DdHX6Ag9857eIUWV+zHs8nG3vfwtPzRM0R zPHrCTRz5QW8bb4mKodalwCmevj3aod5ITWSe4i74R3FauW2T8oMG2DYaD0mFlCAdz6H4FeYz TPjqpZPT5EK0y78cUw6w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The file no longer contains anything useful, so remove it. Signed-off-by: Arnd Bergmann Acked-by: Robert Jarzmik --- arch/arm/mach-pxa/include/mach/dma.h | 17 ----------------- arch/arm/mach-pxa/pxa25x.c | 1 - arch/arm/mach-pxa/pxa27x.c | 1 - arch/arm/mach-pxa/pxa3xx.c | 1 - 4 files changed, 20 deletions(-) delete mode 100644 arch/arm/mach-pxa/include/mach/dma.h -- 2.20.0 diff --git a/arch/arm/mach-pxa/include/mach/dma.h b/arch/arm/mach-pxa/include/mach/dma.h deleted file mode 100644 index 79f9842a7e1c..000000000000 --- a/arch/arm/mach-pxa/include/mach/dma.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * arch/arm/mach-pxa/include/mach/dma.h - * - * Author: Nicolas Pitre - * Created: Jun 15, 2001 - * Copyright: MontaVista Software, Inc. - */ -#ifndef __ASM_ARCH_DMA_H -#define __ASM_ARCH_DMA_H - -#include - -/* DMA Controller Registers Definitions */ -#define DMAC_REGS_VIRT io_p2v(0x40000000) - -#endif /* _ASM_ARCH_DMA_H */ diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 678641ab46e5..0d25cc45f825 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -34,7 +34,6 @@ #include "pxa25x.h" #include #include "pm.h" -#include #include #include "generic.h" diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index f0ba7ed24cb6..f7e89831e85b 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -33,7 +33,6 @@ #include #include #include "pm.h" -#include #include #include "generic.h" diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 560160682df6..6eb1c24d7395 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -32,7 +32,6 @@ #include #include #include "pm.h" -#include #include #include From patchwork Fri Oct 18 15:41:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176888 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1033167ill; Fri, 18 Oct 2019 08:45:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxv4lVAFb+A+PhAtC22DVMUTqlAK4KJLNiroxj18uwKn/K6xJTG7XoF1UoK/TGOcePgrLC8 X-Received: by 2002:a05:6402:7d2:: with SMTP id u18mr10597350edy.23.1571413510131; Fri, 18 Oct 2019 08:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413510; cv=none; d=google.com; s=arc-20160816; b=ZhgIxKpSTR//Boscm0ecO29bd+DJdeVU15FCwId4IlTwL9BUPIwyLACNQ30ZrL0A8Q 4qE52A/8ooR2vqp57IjabcNntgrvmuoTu0wrrt7f9zwuBowms5VoZ1YU71dl9+S0/Wdf mfIFEUYbRfPx5J6toGrZ6h/i8WrUEemNIJngO1Kd3iZTMt63Nt3RPg5nvXx1VsXOipI6 m+8HaRqkJ0FvHpQO2GD4cPH7RFvOpwT/2k0IEGFx8pqgV09miKy6whtbUX++qdRzYmOY qYBn84zvCWeqHvlI7Z9CR+QKuIt+DTEb47ypPeqcCLa27Bz6xWA1E5G+Ju+jmq/qAF+k 2clw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=EeLe8tVFQT947UA7OISp6L7E1UEICQTb/EJ1qRVRwBw=; b=Bw7UrBUVxHuZZX7wEH07n1Pd1zGXykCVCe9Opr4em6lYLT5JqBiRT21eabSf/1prAf Ln48DYaUbN2u3CIBiTS7ynuKz1NSKFPr0bjR9kvDXvjiMRZeJ9nFjgH2RyRvfWZDOxlI xeDd8THJHRFgaCrCFfq48nM2hEL2zeM9V+pwAZon2SSmM3sg2FHW8OeQsmKod0ootpWq ynHpA2ZoVejWPH7kN6T8CA5q6us9D8By/g+TLjRGlFFbxAX+Hg7F2l7H9eSuwLq0WlYJ R78XtwvPx4LKQ8msmFZam59I7yYDbYsiDfTirkCigl+be3bIltMvKCIN2beJqujOnH7q xiPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2si3956712ede.311.2019.10.18.08.45.09; Fri, 18 Oct 2019 08:45:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502228AbfJRPo7 (ORCPT + 26 others); Fri, 18 Oct 2019 11:44:59 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:46437 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505152AbfJRPmj (ORCPT ); Fri, 18 Oct 2019 11:42:39 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MAwTn-1iAEvS44c5-00BIwO; Fri, 18 Oct 2019 17:42:20 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org Subject: [PATCH 06/46] ARM: pxa: stop using mach/bitfield.h Date: Fri, 18 Oct 2019 17:41:21 +0200 Message-Id: <20191018154201.1276638-6-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:RMPIXEZ8B8Uok2FSd/RsBSJ9LSkrToSq1PlXx8YByCDFZq6HKXO KnKe5fjMzjccpDiN5gwwbCczfg8ynNnl+hPrJO+a8PXsXmntRxNg4ozDolk9RjQpP8Zdpik lbMmZLkdEO2w03TYSr5mMYOpaKIOACmd3xYqlWYLZ96deVragbPJL5squJTDw1pzXyT0Dxe cZJNuN3xPdaEgCk9TkpGA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:9Msk+bU1wGA=:TmrLD7gfKbF2/MYts8rrO5 rb7te9H+HV4fW5jwPd9ReehWNBi/EPHqQx+KCgjdx0wnBv0ap+FPaWRTA5B41snTaRncLo4b9 sUBRSE0vAOpimcPBjCtY69H7XsHrPUCrXEyMNoaDKl5at215Qv/37C/WVg1cNXaXXgL2wWiGm 6+lTrQSTDF1qsH5R2RGcK8JMTeCe0PYJUh6ydLEhE9cGxN+WWrIm044zF/4Sj9N47QBArI6wi SXH3WGqxQHgxGuqB+TXtkwOY0a5+HKdaBoYW71yCZXL2qRO4XXA5RGxHZAhFP0kKZcV+1CY1T xdrjBhoQj0SOdm/fENyzDy/quuiZbnOd+myliWyLU/Wv2ILpI0ZOWaUO2nh3FVyz5pqgeSdrv 1pyrY6TNWwwkrfshdRU5tbWefz5syOrpiDz6813tZUdortco9jy8aTfXad/tHF8LtlI283eR3 VNtr8eD4tTARzPStsOJjzd+9jbdQ3va+hHi2GfL37dS1J+9EAUB86tj21evWIDAy/1j0oMVMf YC71YRTkfAX2OpEhO9qkEtKfRQCVkXlu8mxaHsqed5U4u1ZB92lXD0wfapcRB09f5C7hZWVrO 17K8n1n2De9kpHFEVCbGeKMe/AQMHzBLL8Bz0fvtMrgE7EpeZ+p4z2jd2eGz6KxTbZqp5qzWP DZJcJLyQBgvN42lSQvxENc5kxrJFVrwD80koXpTDVXhZJ55/OC9ebkTpt9JzSVMVGErz1TV2+ mIs9CHNjdzm9m9VjxYsWNPGHWR1hzmkWbpWWCZCMMBfxGUG37FFy9/bw6Zazidt3Z+lelKshP yaevwfEbLlJmNceg8Jekxa5lYmamSzmD7wzCmGJpjgeQCP+lupbIgpHFGSLlGEk+lUOt6thrg WRZS5pE3ChqqFuqxACWA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are two identical copies of mach/bitfield.h, one for mach-sa1100 and one for mach-pxa. The pxafb driver only makes use of two macros, which can be trivially open-coded in the header. Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Signed-off-by: Arnd Bergmann Acked-by: Robert Jarzmik --- arch/arm/mach-pxa/idp.c | 1 - arch/arm/mach-pxa/include/mach/regs-lcd.h | 5 +++-- arch/arm/mach-pxa/regs-u2d.h | 2 -- drivers/video/fbdev/pxafb.c | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) -- 2.20.0 diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 57c0511472bc..525d01ddfbbb 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c @@ -30,7 +30,6 @@ #include "pxa25x.h" #include "idp.h" #include -#include #include #include diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/arch/arm/mach-pxa/include/mach/regs-lcd.h index e2b6e3d1f625..6a434675f84a 100644 --- a/arch/arm/mach-pxa/include/mach/regs-lcd.h +++ b/arch/arm/mach-pxa/include/mach/regs-lcd.h @@ -2,8 +2,6 @@ #ifndef __ASM_ARCH_REGS_LCD_H #define __ASM_ARCH_REGS_LCD_H -#include - /* * LCD Controller Registers and Bits Definitions */ @@ -86,6 +84,9 @@ #define LCCR0_OUC (1 << 25) /* Overlay Underlay control bit */ #define LCCR0_LDDALT (1 << 26) /* LDD alternate mapping control */ +#define Fld(Size, Shft) (((Size) << 16) + (Shft)) +#define FShft(Field) ((Field) & 0x0000FFFF) + #define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */ #define LCCR1_DisWdth(Pixel) (((Pixel) - 1) << FShft (LCCR1_PPL)) diff --git a/arch/arm/mach-pxa/regs-u2d.h b/arch/arm/mach-pxa/regs-u2d.h index fe4c80ad87ec..ab517ba62c9a 100644 --- a/arch/arm/mach-pxa/regs-u2d.h +++ b/arch/arm/mach-pxa/regs-u2d.h @@ -2,8 +2,6 @@ #ifndef __ASM_ARCH_PXA3xx_U2D_H #define __ASM_ARCH_PXA3xx_U2D_H -#include - /* * USB2 device controller registers and bits definitions */ diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index ece691a0f18a..e68b8a69db92 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -64,7 +64,6 @@ #include #include #include -#include #include /* From patchwork Fri Oct 18 15:41:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176860 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1030692ill; Fri, 18 Oct 2019 08:43:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoBEhQlrbRciysH6pmpGvVnAKkAmPB9knb5cI5B05IRLX0OHqSfcLmYI/W5kls+DBlkYdt X-Received: by 2002:a17:906:86c8:: with SMTP id j8mr9363597ejy.32.1571413393997; Fri, 18 Oct 2019 08:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413393; cv=none; d=google.com; s=arc-20160816; b=VP42fxm6MT6jhI3cesfhy7MrShExeTWClnaJx0tYvI3dW4dwyWWuP+vJxLBzdkwJu8 qFqPThCYxxIPdhSAd6smpkDnIlq3BEuXF+k22mDVeci4jo2/vdM2FCX/H/EuXf12YvTk AiVGyPz9OElxMK0yn6/M8tuLdaspLe+o+LvdszzZ+G6Jfv7EOz2+9L6I+dQS6dFGsedN I+5CVBrnjMKvVVrY9iJn6uhmhl0vRym4BVg1KTk/9NrUOmKzaIHALLXzt3q71L7xDuOW PstNcaBHnwBc2gkKNWzLm9ibs33Gil9mUM6fPiKBY0f7d7YG8vKg/Bdynws8fHWLy3Gh JkWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dVPCGKlnRDuvgvwsRXndNLb4K6IQAno38vJ/cM59Z1s=; b=otwxqry10I07+TPrAH/s5LK8ciwmV+d4LkZlsfHgNer3vORDaSBMfsjMQE+v8eQuGo zm8nwDpe9xMHKr79Bj2aCwRCAtm187Ro6amyAkLY1PWEKlothE2zOcoHJOXYGbC+o0wT hwNit42IQwgKXRZs53NrDO3t3Vk5s4udRP5a1dHTBbTakPLGYYSG7vImC6C5hn+lAep4 7Lu8Jfn/q989mrCpRJ2KqW0HMQB8PsTXk6uh4xn6CFBdBE83FJGueqJTU95UEzr/Y7sA 7THPeznF5WsRRYi26HKxrnz42J6UgzS8TuMq0UDQsXa3jU87SHWP+BtvSTHqqCvfuZcW lKTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si4155302eda.194.2019.10.18.08.43.13; Fri, 18 Oct 2019 08:43:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505320AbfJRPnK (ORCPT + 26 others); Fri, 18 Oct 2019 11:43:10 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:32989 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505259AbfJRPmz (ORCPT ); Fri, 18 Oct 2019 11:42:55 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MSbt9-1iRlmG1Tzt-00SyLk; Fri, 18 Oct 2019 17:42:21 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Marek Vasut , Tomas Cech , Sergey Lapin , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH 07/46] ARM: pxa: move mach/sound.h to linux/platform_data/ Date: Fri, 18 Oct 2019 17:41:22 +0200 Message-Id: <20191018154201.1276638-7-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:3vE80g8Al+otDUWJBQauUf0JCPEUaiyTrpexojEgYYC6bn6h235 8+Ns5iFTGYCan96WzD49dqDVhV4JssSKcsoR+YrCcOzBDtUFhi2WodLlrnXMDU55wciWiw8 m0R0u5ua1cgKKw6+VLIffLpA0XJQB1pg3Skjzho1LHS4uRhcSC/oyg1B/TH1oicZeovdHQ1 cShujDSXSbQ3BimXWPHlw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:K4kEMx+aSHw=:9TmaYW+bJBmmFnjw8jV5nm C8F4JR12W3nQjxts+k3NpOwkj/CSDDcSRrvjfkaAwYA5RYuQkxV+x219+LYv7ApbwBg3Stpg6 Ls3tzjdKsZ/9r9OF+JSskayFfoLbLYCmZUK1CrBJoE2zN8TlEjLsTZL7dZ/D1tgzhP7x716KV yx2LQKT9rc0KALIyLqYZXozI0RKd6YkNQSAuNJN98PNz/Z2oIWwmzoe1rm9xD/XpWGh4QOeez ivHu8B+5RYSpMxHryQDwFxv1fbOUlTz1kuSYmcxYen7Z1yssZ0CRWxeDB2X7TA1hUcdxPZnKM u53b24hI9ttjyy/uP7arn6toloUcMXCt3XgO8c7EwQvJhDiNL7wD2NAkxcVQJv9UXNC7GzVdg TDR42OntGmEPgqkodhQ+qytXp4wqg69Nebn2JdFqpBl0pWMj4j3nA42kWGU1LeZr13KDRD8UF 7q5QcR6hmq4j1FdxYAyxIrdMRLmsZFioyTFG/0tpr56HSLiN5QmeHaT9Py3N6wWLOEzXrZsLK d1LKfygPIPYTxWI2HXEPZbphA9bWubroRsmDGLDMvhvr5K/kiqoIybCLeiIffKWEKuTo1Je3F BuKSszx9aYP6g/gQztuZXHye5Sv88CmZErxgb9/9ryvkycPjnNOPQ4Gyxf4d9ifsko50TVU0L +W6EkVVulLdjXALXBUL7D9tqOYBmwzzx3uXfrnhFqi0WKhxmxDSV8fQSrDkTT5h6zzGpQ2idZ OLulRy8se1VKmi6o5U+MBuUpOfHZsEw92GicfHcVel/PvYjo8l1xy/a7NFl4zl2R4LPrmBLk4 3bF/2OzF2r5uPfc0TL7rbCvOJ2QH88V42QdrO0/k3oY5Z23kBC99cI72djY81jTMCV0GRnfpp stywYpDJnJRfh4KJBWjg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a basically a platform_data file, so move it out of the mach/* header directory. Cc: Marek Vasut Cc: Tomas Cech Cc: Sergey Lapin Cc: Mark Brown Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/balloon3.c | 2 +- arch/arm/mach-pxa/cm-x2xx.c | 2 +- arch/arm/mach-pxa/cm-x300.c | 2 +- arch/arm/mach-pxa/colibri-pxa270.c | 2 +- arch/arm/mach-pxa/colibri-pxa300.c | 2 +- arch/arm/mach-pxa/colibri-pxa320.c | 2 +- arch/arm/mach-pxa/csb726.c | 2 +- arch/arm/mach-pxa/devices.c | 2 +- arch/arm/mach-pxa/em-x270.c | 2 +- arch/arm/mach-pxa/eseries.c | 2 +- arch/arm/mach-pxa/lpd270.c | 2 +- arch/arm/mach-pxa/lubbock.c | 2 +- arch/arm/mach-pxa/mainstone.c | 2 +- arch/arm/mach-pxa/mioa701.c | 2 +- arch/arm/mach-pxa/palm27x.c | 2 +- arch/arm/mach-pxa/palmld.c | 2 +- arch/arm/mach-pxa/palmt5.c | 2 +- arch/arm/mach-pxa/palmtc.c | 2 +- arch/arm/mach-pxa/palmte2.c | 2 +- arch/arm/mach-pxa/palmtreo.c | 2 +- arch/arm/mach-pxa/palmtx.c | 2 +- arch/arm/mach-pxa/palmz72.c | 2 +- arch/arm/mach-pxa/pcm990-baseboard.c | 2 +- arch/arm/mach-pxa/tosa.c | 2 +- arch/arm/mach-pxa/trizeps4.c | 2 +- arch/arm/mach-pxa/viper.c | 2 +- arch/arm/mach-pxa/vpac270.c | 2 +- arch/arm/mach-pxa/zeus.c | 2 +- arch/arm/mach-pxa/zylonite.c | 2 +- .../mach/audio.h => include/linux/platform_data/asoc-pxa.h | 4 ++-- sound/arm/pxa2xx-ac97-lib.c | 2 +- sound/arm/pxa2xx-ac97.c | 2 +- sound/soc/pxa/corgi.c | 2 +- sound/soc/pxa/e740_wm9705.c | 2 +- sound/soc/pxa/e750_wm9705.c | 2 +- sound/soc/pxa/e800_wm9712.c | 2 +- sound/soc/pxa/em-x270.c | 2 +- sound/soc/pxa/mioa701_wm9713.c | 2 +- sound/soc/pxa/palm27x.c | 2 +- sound/soc/pxa/poodle.c | 2 +- sound/soc/pxa/pxa2xx-ac97.c | 2 +- sound/soc/pxa/pxa2xx-i2s.c | 2 +- sound/soc/pxa/tosa.c | 2 +- sound/soc/pxa/z2.c | 2 +- 44 files changed, 45 insertions(+), 45 deletions(-) rename arch/arm/mach-pxa/include/mach/audio.h => include/linux/platform_data/asoc-pxa.h (93%) -- 2.20.0 Acked-by: Mark Brown Acked-by: Robert Jarzmik diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 26140249c784..82f9299f67d3 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -41,7 +41,7 @@ #include "pxa27x.h" #include -#include +#include #include #include #include "udc.h" diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index c731539add9f..b13fcc72abab 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c @@ -32,7 +32,7 @@ #undef GPIO87_GPIO #undef GPIO88_GPIO #undef GPIO89_GPIO -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index f3f2703fffc6..6cdc440672a6 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c index 2f2cd2ae4187..5dc669752836 100644 --- a/arch/arm/mach-pxa/colibri-pxa270.c +++ b/arch/arm/mach-pxa/colibri-pxa270.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include "colibri.h" #include "pxa27x.h" diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c index 4ceeea142bfd..11ca6c4795e7 100644 --- a/arch/arm/mach-pxa/colibri-pxa300.c +++ b/arch/arm/mach-pxa/colibri-pxa300.c @@ -24,7 +24,7 @@ #include "colibri.h" #include #include -#include +#include #include "generic.h" #include "devices.h" diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c index eba917d69c0a..c1e97d4345dc 100644 --- a/arch/arm/mach-pxa/colibri-pxa320.c +++ b/arch/arm/mach-pxa/colibri-pxa320.c @@ -24,7 +24,7 @@ #include "colibri.h" #include #include -#include +#include #include "pxa27x-udc.h" #include "udc.h" diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c index d48493445ae5..88f2f1d96c7b 100644 --- a/arch/arm/mach-pxa/csb726.c +++ b/arch/arm/mach-pxa/csb726.c @@ -22,7 +22,7 @@ #include "pxa27x.h" #include #include -#include +#include #include #include "generic.h" diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index c289a6c2311d..233035e6a2ff 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index d8681a331030..5bb72a41dae2 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -37,7 +37,7 @@ #include "pxa27x.h" #include "pxa27x-udc.h" -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index 91f7c3e40065..d8a87ff66675 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c @@ -34,7 +34,7 @@ #include "pxa25x.h" #include #include "eseries-irq.h" -#include +#include #include #include "udc.h" #include diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 1b7c2def3033..c59fd2624f91 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c @@ -39,7 +39,7 @@ #include "pxa27x.h" #include "lpd270.h" #include -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 477d144f039c..098605c8eeed 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c @@ -45,7 +45,7 @@ #include #include "pxa25x.h" -#include +#include #include #include "udc.h" #include diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 16883c996c45..ed505de6b5d9 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c @@ -45,7 +45,7 @@ #include "pxa27x.h" #include "mainstone.h" -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index c360023a989c..c78d2d245309 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c @@ -42,7 +42,7 @@ #include "udc.h" #include "pxa27x-udc.h" #include -#include +#include #include #include "mioa701.h" diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c index 3ad0b3915ae1..a93169a12ad7 100644 --- a/arch/arm/mach-pxa/palm27x.c +++ b/arch/arm/mach-pxa/palm27x.c @@ -25,7 +25,7 @@ #include #include "pxa27x.h" -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index 5f73716a77f0..d85146957004 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c @@ -29,7 +29,7 @@ #include #include "pxa27x.h" -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c index 902403367786..4e2cff87deba 100644 --- a/arch/arm/mach-pxa/palmt5.c +++ b/arch/arm/mach-pxa/palmt5.c @@ -30,7 +30,7 @@ #include #include "pxa27x.h" -#include +#include #include "palmt5.h" #include #include diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index f52bd155e825..71917127dfdd 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c @@ -30,7 +30,7 @@ #include #include "pxa25x.h" -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index a92b9665f425..1621d3d3f76f 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c @@ -30,7 +30,7 @@ #include #include "pxa25x.h" -#include +#include #include "palmte2.h" #include #include diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index 2bf0f7f3ea24..d6d5b90d9578 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c @@ -29,7 +29,7 @@ #include "pxa27x.h" #include "pxa27x-udc.h" -#include +#include #include "palmtreo.h" #include #include diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 926593ecf1c9..eed25d09dfb2 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -33,7 +33,7 @@ #include #include "pxa27x.h" -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c index 77fe2e367324..1bf11c888b4e 100644 --- a/arch/arm/mach-pxa/palmz72.c +++ b/arch/arm/mach-pxa/palmz72.c @@ -35,7 +35,7 @@ #include #include "pxa27x.h" -#include +#include #include "palmz72.h" #include #include diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index cb1c56769fbc..84af112fa819 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c @@ -30,7 +30,7 @@ #include #include #include "pxa27x.h" -#include +#include #include #include #include "pcm990_baseboard.h" diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index f537ff1c3ba7..23da9568c520 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -46,7 +46,7 @@ #include #include "udc.h" #include "tosa_bt.h" -#include +#include #include #include diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index f76f8be09554..1337008cc760 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -41,7 +41,7 @@ #include "pxa27x.h" #include -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 16f33e576902..7d1cb2c2dfa1 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -46,7 +46,7 @@ #include #include "pxa25x.h" -#include +#include #include #include "regs-uart.h" #include diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 26a5ebc00069..7abbebc5d455 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c @@ -30,7 +30,7 @@ #include #include "pxa27x.h" -#include +#include #include #include #include diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 239faff71a1f..6652b1e5978e 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -46,7 +46,7 @@ #include "udc.h" #include #include "pm.h" -#include +#include #include #include "zeus.h" #include diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index c56c86b35025..e3ae45f444d5 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c @@ -25,7 +25,7 @@ #include #include #include "pxa3xx.h" -#include +#include #include #include "zylonite.h" #include diff --git a/arch/arm/mach-pxa/include/mach/audio.h b/include/linux/platform_data/asoc-pxa.h similarity index 93% rename from arch/arm/mach-pxa/include/mach/audio.h rename to include/linux/platform_data/asoc-pxa.h index 7beebf7297b5..327454cd8246 100644 --- a/arch/arm/mach-pxa/include/mach/audio.h +++ b/include/linux/platform_data/asoc-pxa.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __ASM_ARCH_AUDIO_H__ -#define __ASM_ARCH_AUDIO_H__ +#ifndef __SOC_PXA_AUDIO_H__ +#define __SOC_PXA_AUDIO_H__ #include #include diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 84d5f85073b9..9b5c1f0f8998 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c @@ -23,7 +23,7 @@ #include #include -#include +#include static DEFINE_MUTEX(car_mutex); static DECLARE_WAIT_QUEUE_HEAD(gsr_wq); diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index acfaf1d4ec25..2e99232028ac 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c @@ -22,7 +22,7 @@ #include #include -#include +#include static void pxa2xx_ac97_legacy_reset(struct snd_ac97 *ac97) { diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index d81082323fb4..47647a1c3124 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include "../codecs/wm8731.h" #include "pxa2xx-i2s.h" diff --git a/sound/soc/pxa/e740_wm9705.c b/sound/soc/pxa/e740_wm9705.c index eafa1482afbe..f922be7e0016 100644 --- a/sound/soc/pxa/e740_wm9705.c +++ b/sound/soc/pxa/e740_wm9705.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/sound/soc/pxa/e750_wm9705.c b/sound/soc/pxa/e750_wm9705.c index d75510d7b16b..308828cd736b 100644 --- a/sound/soc/pxa/e750_wm9705.c +++ b/sound/soc/pxa/e750_wm9705.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c index 56d543da938a..d74fcceef687 100644 --- a/sound/soc/pxa/e800_wm9712.c +++ b/sound/soc/pxa/e800_wm9712.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include static int e800_spk_amp_event(struct snd_soc_dapm_widget *w, diff --git a/sound/soc/pxa/em-x270.c b/sound/soc/pxa/em-x270.c index 9076ea7e9339..b59ec22e1e7e 100644 --- a/sound/soc/pxa/em-x270.c +++ b/sound/soc/pxa/em-x270.c @@ -23,7 +23,7 @@ #include #include -#include +#include SND_SOC_DAILINK_DEFS(ac97, DAILINK_COMP_ARRAY(COMP_CPU("pxa2xx-ac97")), diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 129eb5251a5f..f78ab7ce8fc7 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c index b92ea1a0453f..275c86379e88 100644 --- a/sound/soc/pxa/palm27x.c +++ b/sound/soc/pxa/palm27x.c @@ -20,7 +20,7 @@ #include #include -#include +#include #include static struct snd_soc_jack hs_jack; diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index 48d5c2252b10..f289c089aede 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "../codecs/wm8731.h" #include "pxa2xx-i2s.h" diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index eb99e01ee26f..2138106fed23 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c @@ -23,7 +23,7 @@ #include #include -#include +#include static void pxa2xx_ac97_warm_reset(struct ac97_controller *adrv) { diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index e7c43fe46dff..583b2de897c7 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include "pxa2xx-i2s.h" diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index b429db25f884..81ee1bcf4c44 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c @@ -24,7 +24,7 @@ #include #include -#include +#include #define TOSA_HP 0 #define TOSA_MIC_INT 1 diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c index 8f121ca13eee..1fb3e7ac42fa 100644 --- a/sound/soc/pxa/z2.c +++ b/sound/soc/pxa/z2.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include "../codecs/wm8750.h" From patchwork Fri Oct 18 15:41:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176848 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1029869ill; Fri, 18 Oct 2019 08:42:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+LAxU1d58d0UTsOY3eSXmBVaH1mu+aEfbY2C9B4PeleeiZGqGHZhrlb1SotY8qh5RO371 X-Received: by 2002:aa7:db59:: with SMTP id n25mr10512025edt.288.1571413357947; Fri, 18 Oct 2019 08:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413357; cv=none; d=google.com; s=arc-20160816; b=c7TfWqGebLJVd1l94gxLSsWFqkZIvpqPwm4fRptWqceesMrhXV4bG9ijJLBd3pHK/m UcFRMNqlCoiJNzLnRv+0F0zCG19AwBEdvj5kC314wk+YgRcLk8c6oh6hLvWaSZ+0Pj90 1GgchDexJASu3q3DWw2suNkzrqSeg99eCLfnLi32XbZrs1RKGE8iLWom1uk3kxUUZI83 AHw+qfrLBe7SsuqyFdLDXjZXj5NsQIxVYr00RG2ouQ3EpK4BMBCKPN3G49/FopwHIdon 1kklVa84wtPcdN5a6mVSj1ervNOvE8gWNSbvo5Z5y3fvyD/rPQQsMHtSBTqR0LhwwBKG sCrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OtfIWLvrxdvpy+ULr4Mn9nWTezwuyC3Sq0A+yDT4a/4=; b=B61ujcnc5Fksgm/CVOi5bWThSV57BjEe1x6JMTC0VTfk0Sbkr0lV4kDhVKGr3ODaZI i0eMEGqtgSv+s1fyYaJ7LTv64/LPQcaQwY8NbzmUeByCpQM+2CMrBX+6OcbjWFCMRULU c5iP7sYH7+AUUQC9ghV4AhZ+zTxjM3yGCFRTiJ13AtSHgxdUtWS66xPUN478Yd9JSCW4 fIzLMUw7QdP9dxGHqy9wZ1Wcr/YoV3LocYluZJxEHNT8fBLy98UHmyZjyJY7LgoiRNGF BjmOo3sqb3+Hh5jJ1X2hriEqMC+4Cnp03Evd7ny1m1L6UDkIN8O0wFYbiv78H3Dapjay VLIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si4295368ede.118.2019.10.18.08.42.37; Fri, 18 Oct 2019 08:42:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2501970AbfJRPme (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:34 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:39527 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405757AbfJRPmc (ORCPT ); Fri, 18 Oct 2019 11:42:32 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MLR9p-1idIMQ30kt-00IYEY; Fri, 18 Oct 2019 17:42:21 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: [PATCH 08/46] ARM: pxa: move regs-lcd.h into driver Date: Fri, 18 Oct 2019 17:41:23 +0200 Message-Id: <20191018154201.1276638-8-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:5LAnEr6iwK59JevwtHrYZroQN0McBCT7qyhw48WP7uThIH9moug DFbvYgETyVbB08XUvk/zUJ/9z1oe9LvNnc2kbVl+FKRiYDVArMPrcONKrV/8VAlPlQOcbrK 1VjYR2TCvM5GjapZzXH33Oa7HA+ZdVo7VtqkozzDGGiJ931w9rlOBRhqlL+lgwmC+ZJyUZ7 S7kjWYmaVoMwEA+Y4OF0g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:vHxA+ZpjrdY=:XNCy9TULDG9fJPLTSxJWH9 RzrjppOcb3r1l6j92A6STsqoCsmwOnL/W8eWKBqCbgTGwEXQPhIwj3WHlDUmNSeLMgNWQ8LO/ yGSXtK9RIIhblaQhJ8WwUkKIwh2quYl52HNmdKFMdXVXsZrp4skV4BS4CBN80WNRt+JL2PtNJ JNB1Vk6RMXsLJWIzvHbxfQ0/bEFjIjH+xrst3yv7cA4d2AV9hsydUDw1mO27RX6Fz/Ic2CifQ ixlCP9W3blwBWzF4xIYW4kPaIZuhZwz32D6sLwsJ3N/tbRsi/isqTBk7fsAa0rJBSQgscpf+j 2c0f+eQFxy3kea8sdTSskHXuBdGuU2R7DEkqDJkmm0Pd51dsiEe1Dbo0LUEH3H9bY/V311xYl Ve24rNLJhOWk4bOpbk5Ok9QLPTRnR2pl59v9oHQfyvICrdmR4it2dnv87jDdYgoqUIR3lndjF MbiZSDCepHhYWhUXab5eqIZTsynSLEpfuXDFCLyv5bZFPM3D9VEbTCvgqL4MNTUswVfQgESAj 9veFgI3CpZkztrXyX2x6T0EgGAvOAMPaSchSyX/Y5hAQVG5Awc9H6FuoUEMqy9dN9lkZZzS2L hkC/ToH3fuv8bDPmPwGdrpaGPUo02QISaTfJxW8mJJJ51CyS7psslutJqgXDxN872C6mvKl9E w3oXbWi5LSyYkqbc3hYRZv4RtwENikgUnq4YxkqGCt3XxAWVilcQo93g7XYcbX47OndD3q+Km gvjD81yBDg5OGm7UgZC2ghsIVyu+YayYRjN16jXk1VzXS/Eiuawe3ON77og0MHmHdwvu5JxEg 4zHCADbvpnH2aMDhvMzuTICkExfS8JO52Aq7YYcL5CNYZojvmlba3ZS9RJ6FPFdZXcjK+HICO tV684DZtaYjUf1cF8AHA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only the pxafb driver uses this header, so move it into the same directory. The SMART_* macros are required by some platform data definitions and can go into the linux/platform_data/video-pxafb.h header. Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Arnd Bergmann --- .../video/fbdev/pxa3xx-regs.h | 19 ---------------- drivers/video/fbdev/pxafb.c | 1 + include/linux/platform_data/video-pxafb.h | 22 ++++++++++++++++++- 3 files changed, 22 insertions(+), 20 deletions(-) rename arch/arm/mach-pxa/include/mach/regs-lcd.h => drivers/video/fbdev/pxa3xx-regs.h (90%) -- 2.20.0 diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/drivers/video/fbdev/pxa3xx-regs.h similarity index 90% rename from arch/arm/mach-pxa/include/mach/regs-lcd.h rename to drivers/video/fbdev/pxa3xx-regs.h index 6a434675f84a..6a96610ef9b5 100644 --- a/arch/arm/mach-pxa/include/mach/regs-lcd.h +++ b/drivers/video/fbdev/pxa3xx-regs.h @@ -177,23 +177,4 @@ #define PRSR_ST_OK (1 << 9) /* Status OK */ #define PRSR_CON_NT (1 << 10) /* Continue to Next Command */ -#define SMART_CMD_A0 (0x1 << 8) -#define SMART_CMD_READ_STATUS_REG (0x0 << 9) -#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0) -#define SMART_CMD_WRITE_COMMAND (0x1 << 9) -#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0) -#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0) -#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9) -#define SMART_CMD_NOOP (0x4 << 9) -#define SMART_CMD_INTERRUPT (0x5 << 9) - -#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) -#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff)) - -/* SMART_DELAY() is introduced for software controlled delay primitive which - * can be inserted between command sequences, unused command 0x6 is used here - * and delay ranges from 0ms ~ 255ms - */ -#define SMART_CMD_DELAY (0x6 << 9) -#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff)) #endif /* __ASM_ARCH_REGS_LCD_H */ diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index e68b8a69db92..a65453c6c390 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -72,6 +72,7 @@ #define DEBUG_VAR 1 #include "pxafb.h" +#include "pxa3xx-regs.h" /* Bits which should not be set in machine configuration structures */ #define LCCR0_INVALID_CONFIG_MASK (LCCR0_OUM | LCCR0_BM | LCCR0_QDM |\ diff --git a/include/linux/platform_data/video-pxafb.h b/include/linux/platform_data/video-pxafb.h index b3d574778326..6333bac166a5 100644 --- a/include/linux/platform_data/video-pxafb.h +++ b/include/linux/platform_data/video-pxafb.h @@ -8,7 +8,6 @@ */ #include -#include /* * Supported LCD connections @@ -153,6 +152,27 @@ struct pxafb_mach_info { void pxa_set_fb_info(struct device *, struct pxafb_mach_info *); unsigned long pxafb_get_hsync_time(struct device *dev); +/* smartpanel related */ +#define SMART_CMD_A0 (0x1 << 8) +#define SMART_CMD_READ_STATUS_REG (0x0 << 9) +#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0) +#define SMART_CMD_WRITE_COMMAND (0x1 << 9) +#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0) +#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0) +#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9) +#define SMART_CMD_NOOP (0x4 << 9) +#define SMART_CMD_INTERRUPT (0x5 << 9) + +#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) +#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff)) + +/* SMART_DELAY() is introduced for software controlled delay primitive which + * can be inserted between command sequences, unused command 0x6 is used here + * and delay ranges from 0ms ~ 255ms + */ +#define SMART_CMD_DELAY (0x6 << 9) +#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff)) + #ifdef CONFIG_FB_PXA_SMARTPANEL extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int); extern int pxafb_smart_flush(struct fb_info *info); From patchwork Fri Oct 18 15:41:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176858 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1030544ill; Fri, 18 Oct 2019 08:43:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEPxkWJdTIFiVZFurSVsLH0AcnrvGR+bXulRih2A1rd7bNJU7XY51uWUAse/DyzGA3kKeA X-Received: by 2002:a50:f395:: with SMTP id g21mr10126288edm.223.1571413388279; Fri, 18 Oct 2019 08:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413388; cv=none; d=google.com; s=arc-20160816; b=pCVpTQr0kdFd3NRX4PhsY8hgq4+5Jx+Zglov7YRZrsKHmiDsChg7D0v4coOxvOGms9 HPtsB9jwlP+bkAMT+4Kz6hVrg2wGzlWFB/PE6aUqRKu9jOqwv9hc/svNr1Wjc8PHQ5wQ NFeSKXj6YgUJp1Je8ONKMrVb53Ulq4+RfeSb2OWszg3/lWvumkFeonXR7EWpxp3FeIBr ckCJclWsCUl0iSmiTGhR6/+C4g2h4GDaEoTiEMYEE1bjA7NHIlahRII3lje80uRF9fAt zBTaRyrm9m7drqtIt35fL0q6uf5eEKGddvBvkeTF+eVikd0hYgdfTxZLN7KcI0VuG6ZD DVjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=0JX0Yk8IPY+EsvFp7y6lSZ293gW2eIT0rix1wfqZa5Y=; b=Q1/TZH1BVz76ufz7SKhUufwAV2sOOoV/S6r+vf7wRR+G3I4ZZ6t/rcxkU1N3YtI/ce DPQ6J9VJD42yphXBA34m8Ag3j3n0Mxm/Zl9Kov0wZ9HHMftxooc7EUWrtPGbW2s+IZbg XUVe4VSI92ET5mNqrRxxFK+oI51O+yaL8NO/w9WLZaQlTjwiVDS0LIqr6OHAhDzu5YP5 s8SrWto04UXsgnn1R8cAX3LoPUsY874bF5vLbNi7DxaIwA8DMbqN26X153J53drXuZqv gwe4u2dmLgannVx/NisjW7c1lv0zRIWDCWeeVk37ZBmRPVn8AiMWDi3FYkPw5mdK6E4C FX/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b56si4139714edb.418.2019.10.18.08.43.07; Fri, 18 Oct 2019 08:43:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505309AbfJRPnE (ORCPT + 26 others); Fri, 18 Oct 2019 11:43:04 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:50365 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505260AbfJRPm4 (ORCPT ); Fri, 18 Oct 2019 11:42:56 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M8yoa-1iRWGW0hh0-0065Ln; Fri, 18 Oct 2019 17:42:22 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [PATCH 09/46] watchdog: sa1100: use platform device registration Date: Fri, 18 Oct 2019 17:41:24 +0200 Message-Id: <20191018154201.1276638-9-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:qDo493GPFAz++Q7671EcxnlzzinllHVjM/CFjptshgQp1jXIaEq axRtNVML8vy7Kbp4of0v0hu4ghjNw3aE8jK7SdTSmW+EEAVTMbaNX5TiikTP/CGsWeRTW1a jDtkCfc4qo0wfK2OBYj/vppBfusq6xJ+kSPFzdhz1u0sL3jbFBHkIgoxgG0tK+PbtRGr8sT AV/MHCZnZagCepUOJ0ByA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:cooY8u8FubQ=:9naSPVnB74pxkfr2WfdM6B YeNT+wFevlI1NKfx/E8MzpHOLE7F9qQrw6vMjOaF28mWqlAcc/715U5K6QA0z8VGSpQY2UKpp YRJfAzVpPErVlcoW8rezcbrRs6Y/oRGS081gAfbDjSihiaFOd6BTlHZk3RYZzCCclQfTOua/v f/+p9w6/AeNv2CcaI1rq+CdLcDQSHwhlbOv32ecniqLuSjkeHbR3OZWkyKo7dlsjDkNuFlHY6 IvVwszL7uLayFDTaCkxWxzEfdBwhz/hnLUURj55vfuhW0LHIPQvpoqtsAcwDAC1HfInAAG1Iy zg4OZqfJF22IxPkZizInuXtX/gAYQF1/0H85zoBjjzpQQ1Hj28xlHkeSKRCF5OAD7Ajljv9FN 0CdCPBrTGqhKDRUyonjHAFWHtBOsuQ5ntruFLlICo6iSZhUoExIo0RzBz1biSYLiLLh068G3i FFJNxHyvqnNrvg6XuCiVaZQRTQtLgkD4D77+3hxp8wr7Y264tirpK2ieKOnTKtHOSz+vOxtdY 2geU/cIbwJ2iytTCJtuMu/q9SXLRODfsYP9WBUdhFLFpnSt7LmwrmB3/OJrl65NWIQEoA69Jt +RtcvhBO46u1kYQTz/ffEFTxH3+jtYppHIvC5S4gBrcuxF/ZIW4OuzUOhwpv3fmIUW7DUhMpA Rvbvw6MhfZqrMZCImZmNn9d4BX7nNYHPDeAAi+i18y8nJ80E7XYhPD3/MIbMcmK5p40Ya+7ke +TntP/Rd2kC/McQvn6h2rX2Y4a0s54SHOL0RcjoLOyQGP2U6Qj8aVeWYNP/t6O/7o8jAvUAZU LqdQGt3ApvkOjmY2WOGY0z49tczcmehFWwz4cRduPqNyjLLKmzMeAhGYDNLj7Z0sTvIlHQVYB 62ivIlIIoydxX5bXwuuw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rather than relying on machine specific headers to pass down the reboot status and the register locations, use resources and platform_data. Aside from this, keep the changes to a minimum. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/devices.c | 11 +++ arch/arm/mach-pxa/include/mach/regs-ost.h | 2 + arch/arm/mach-pxa/include/mach/reset.h | 2 +- arch/arm/mach-pxa/pxa25x.c | 2 +- arch/arm/mach-pxa/pxa27x.c | 2 +- arch/arm/mach-pxa/pxa3xx.c | 2 +- arch/arm/mach-pxa/reset.c | 3 - arch/arm/mach-sa1100/generic.c | 6 +- arch/arm/mach-sa1100/include/mach/reset.h | 1 - drivers/watchdog/sa1100_wdt.c | 87 ++++++++++++++++------- 10 files changed, 83 insertions(+), 35 deletions(-) -- 2.20.0 diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 233035e6a2ff..fb9b4f6d32de 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -23,6 +23,8 @@ #include #include +#include +#include #include "devices.h" #include "generic.h" @@ -1110,3 +1112,12 @@ void __init pxa2xx_set_dmac_info(struct mmp_dma_platdata *dma_pdata) { pxa_register_device(&pxa2xx_pxa_dma, dma_pdata); } + +void __init pxa_register_wdt(unsigned int reset_status) +{ + struct resource res = DEFINE_RES_MEM(OST_PHYS, OST_LEN); + + reset_status &= RESET_STATUS_WATCHDOG; + platform_device_register_resndata(NULL, "sa1100_wdt", -1, &res, 1, + &reset_status, sizeof(reset_status)); +} diff --git a/arch/arm/mach-pxa/include/mach/regs-ost.h b/arch/arm/mach-pxa/include/mach/regs-ost.h index 109d0ed264df..c8001cfc8d6b 100644 --- a/arch/arm/mach-pxa/include/mach/regs-ost.h +++ b/arch/arm/mach-pxa/include/mach/regs-ost.h @@ -7,6 +7,8 @@ /* * OS Timer & Match Registers */ +#define OST_PHYS 0x40A00000 +#define OST_LEN 0x00000020 #define OSMR0 io_p2v(0x40A00000) /* */ #define OSMR1 io_p2v(0x40A00004) /* */ diff --git a/arch/arm/mach-pxa/include/mach/reset.h b/arch/arm/mach-pxa/include/mach/reset.h index e1c4d100fd45..963dd190bc13 100644 --- a/arch/arm/mach-pxa/include/mach/reset.h +++ b/arch/arm/mach-pxa/include/mach/reset.h @@ -8,8 +8,8 @@ #define RESET_STATUS_GPIO (1 << 3) /* GPIO Reset */ #define RESET_STATUS_ALL (0xf) -extern unsigned int reset_status; extern void clear_reset_status(unsigned int mask); +extern void pxa_register_wdt(unsigned int reset_status); /** * init_gpio_reset() - register GPIO as reset generator diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 305047ebd2f1..dfc90b41fba3 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -240,7 +240,7 @@ static int __init pxa25x_init(void) if (cpu_is_pxa25x()) { - reset_status = RCSR; + pxa_register_wdt(RCSR); pxa25x_init_pm(); diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index a81ac88ecbfd..38fdd22c4dc5 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -337,7 +337,7 @@ static int __init pxa27x_init(void) if (cpu_is_pxa27x()) { - reset_status = RCSR; + pxa_register_wdt(RCSR); pxa27x_init_pm(); diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index fc84aed99481..7c569fa2a6da 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -463,7 +463,7 @@ static int __init pxa3xx_init(void) if (cpu_is_pxa3xx()) { - reset_status = ARSR; + pxa_register_wdt(ARSR); /* * clear RDH bit every time after reset diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index af78405aa4e9..fcb791c5ae3e 100644 --- a/arch/arm/mach-pxa/reset.c +++ b/arch/arm/mach-pxa/reset.c @@ -11,9 +11,6 @@ #include #include -unsigned int reset_status; -EXPORT_SYMBOL(reset_status); - static void do_hw_reset(void); static int reset_gpio = -1; diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 4dfb7554649d..6c21f214cd60 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c @@ -39,9 +39,6 @@ #include "generic.h" #include -unsigned int reset_status; -EXPORT_SYMBOL(reset_status); - #define NR_FREQS 16 /* @@ -319,10 +316,13 @@ static struct platform_device *sa11x0_devices[] __initdata = { static int __init sa1100_init(void) { + struct resource wdt_res = DEFINE_RES_MEM(0x90000000, 0x20); pm_power_off = sa1100_power_off; regulator_has_full_constraints(); + platform_device_register_simple("sa1100_wdt", -1, &wdt_res, 1); + return platform_add_devices(sa11x0_devices, ARRAY_SIZE(sa11x0_devices)); } diff --git a/arch/arm/mach-sa1100/include/mach/reset.h b/arch/arm/mach-sa1100/include/mach/reset.h index 27695650a567..a6723d45ae2a 100644 --- a/arch/arm/mach-sa1100/include/mach/reset.h +++ b/arch/arm/mach-sa1100/include/mach/reset.h @@ -10,7 +10,6 @@ #define RESET_STATUS_GPIO (1 << 3) /* GPIO Reset */ #define RESET_STATUS_ALL (0xf) -extern unsigned int reset_status; static inline void clear_reset_status(unsigned int mask) { RCSR = mask; diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c index 0f6ffc1e7f4e..a24d6a07c7a7 100644 --- a/drivers/watchdog/sa1100_wdt.c +++ b/drivers/watchdog/sa1100_wdt.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -30,16 +31,42 @@ #include #include -#ifdef CONFIG_ARCH_PXA -#include -#endif +#define REG_OSMR0 0x0000 /* OS timer Match Reg. 0 */ +#define REG_OSMR1 0x0004 /* OS timer Match Reg. 1 */ +#define REG_OSMR2 0x0008 /* OS timer Match Reg. 2 */ +#define REG_OSMR3 0x000c /* OS timer Match Reg. 3 */ +#define REG_OSCR 0x0010 /* OS timer Counter Reg. */ +#define REG_OSSR 0x0014 /* OS timer Status Reg. */ +#define REG_OWER 0x0018 /* OS timer Watch-dog Enable Reg. */ +#define REG_OIER 0x001C /* OS timer Interrupt Enable Reg. */ -#include +#define OSSR_M3 (1 << 3) /* Match status channel 3 */ +#define OSSR_M2 (1 << 2) /* Match status channel 2 */ +#define OSSR_M1 (1 << 1) /* Match status channel 1 */ +#define OSSR_M0 (1 << 0) /* Match status channel 0 */ + +#define OWER_WME (1 << 0) /* Watchdog Match Enable */ + +#define OIER_E3 (1 << 3) /* Interrupt enable channel 3 */ +#define OIER_E2 (1 << 2) /* Interrupt enable channel 2 */ +#define OIER_E1 (1 << 1) /* Interrupt enable channel 1 */ +#define OIER_E0 (1 << 0) /* Interrupt enable channel 0 */ static unsigned long oscr_freq; static unsigned long sa1100wdt_users; static unsigned int pre_margin; static int boot_status; +static void __iomem *reg_base; + +static inline void sa1100_wr(u32 val, u32 offset) +{ + writel_relaxed(val, reg_base + offset); +} + +static inline u32 sa1100_rd(u32 offset) +{ + return readl_relaxed(reg_base + offset); +} /* * Allow only one person to hold it open @@ -50,10 +77,10 @@ static int sa1100dog_open(struct inode *inode, struct file *file) return -EBUSY; /* Activate SA1100 Watchdog timer */ - writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3); - writel_relaxed(OSSR_M3, OSSR); - writel_relaxed(OWER_WME, OWER); - writel_relaxed(readl_relaxed(OIER) | OIER_E3, OIER); + sa1100_wr(sa1100_rd(REG_OSCR) + pre_margin, REG_OSMR3); + sa1100_wr(OSSR_M3, REG_OSSR); + sa1100_wr(OWER_WME, REG_OWER); + sa1100_wr(sa1100_rd(REG_OIER) | OIER_E3, REG_OIER); return stream_open(inode, file); } @@ -61,7 +88,7 @@ static int sa1100dog_open(struct inode *inode, struct file *file) * The watchdog cannot be disabled. * * Previous comments suggested that turning off the interrupt by - * clearing OIER[E3] would prevent the watchdog timing out but this + * clearing REG_OIER[E3] would prevent the watchdog timing out but this * does not appear to be true (at least on the PXA255). */ static int sa1100dog_release(struct inode *inode, struct file *file) @@ -76,7 +103,7 @@ static ssize_t sa1100dog_write(struct file *file, const char __user *data, { if (len) /* Refresh OSMR3 timer. */ - writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3); + sa1100_wr(sa1100_rd(REG_OSCR) + pre_margin, REG_OSMR3); return len; } @@ -110,7 +137,7 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd, break; case WDIOC_KEEPALIVE: - writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3); + sa1100_wr(sa1100_rd(REG_OSCR) + pre_margin, REG_OSMR3); ret = 0; break; @@ -125,7 +152,7 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd, } pre_margin = oscr_freq * time; - writel_relaxed(readl_relaxed(OSCR) + pre_margin, OSMR3); + sa1100_wr(sa1100_rd(REG_OSCR) + pre_margin, REG_OSMR3); /*fall through*/ case WDIOC_GETTIMEOUT: @@ -150,12 +177,22 @@ static struct miscdevice sa1100dog_miscdev = { .fops = &sa1100dog_fops, }; -static int margin __initdata = 60; /* (secs) Default is 1 minute */ +static int margin = 60; /* (secs) Default is 1 minute */ static struct clk *clk; -static int __init sa1100dog_init(void) +static int sa1100dog_probe(struct platform_device *pdev) { int ret; + int *platform_data; + struct resource *res; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENXIO; + reg_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); + ret = PTR_ERR_OR_ZERO(reg_base); + if (ret) + return ret; clk = clk_get(NULL, "OSTIMER0"); if (IS_ERR(clk)) { @@ -173,13 +210,9 @@ static int __init sa1100dog_init(void) oscr_freq = clk_get_rate(clk); - /* - * Read the reset status, and save it for later. If - * we suspend, RCSR will be cleared, and the watchdog - * reset reason will be lost. - */ - boot_status = (reset_status & RESET_STATUS_WATCHDOG) ? - WDIOF_CARDRESET : 0; + platform_data = pdev->dev.platform_data; + if (platform_data && *platform_data) + boot_status = WDIOF_CARDRESET; pre_margin = oscr_freq * margin; ret = misc_register(&sa1100dog_miscdev); @@ -195,15 +228,21 @@ static int __init sa1100dog_init(void) return ret; } -static void __exit sa1100dog_exit(void) +static int sa1100dog_remove(struct platform_device *pdev) { misc_deregister(&sa1100dog_miscdev); clk_disable_unprepare(clk); clk_put(clk); + + return 0; } -module_init(sa1100dog_init); -module_exit(sa1100dog_exit); +struct platform_driver sa1100dog_driver = { + .driver.name = "sa1100_wdt", + .probe = sa1100dog_probe, + .remove = sa1100dog_remove, +}; +module_platform_driver(sa1100dog_driver); MODULE_AUTHOR("Oleg Drokin "); MODULE_DESCRIPTION("SA1100/PXA2xx Watchdog"); From patchwork Fri Oct 18 15:41:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176852 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1029988ill; Fri, 18 Oct 2019 08:42:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqypltIbJk1OJ3arQzSdWcfXCDgjc0Ix48UqdVg1ZsH3WfYsCyrfxPe9UIfaAhkAjprAgTTT X-Received: by 2002:a05:6402:14d6:: with SMTP id f22mr10593779edx.148.1571413364519; Fri, 18 Oct 2019 08:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413364; cv=none; d=google.com; s=arc-20160816; b=mtqBmeUHQZbUIHcMa7Y04MWqNThqJSy8NhONsPoXlGvF8YDeAfK1OrnzATzQ652r9t 1nzGxOl+VfUcrNFTvcoidP0lm1iWn8XnJN+g/tjn2po0fl9QqtkQE5wVmApxiFyNP5Qu w7/iB4mOhH9oJI90ee0Zo02O/V7e09ijykUrDnnqi1tpo/4gSic79u2XakYOk1LCNTfF 7CFZ4jBNmnUpDnsXwxVW/z+TCeLaNBRurZhNRlOL2GSpNr+FwcMqHpXDY9ydY/fJeNKg SH/r/oI2dYaF2FVPsWLkt2Nylk91t2DZAALXtyR1F8eXboC1K7nbUH+YDKcSom+6bWqO ClrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ATcA4kgMsDippu+cyHGCQneJGB3HWc/2cWROcg+Lqok=; b=X+tOf2Lx8M5NvVBzDeArh5HnFjCiHsM4BIEQxHdnTZ8JmdMn/BmKavVPfRXEH+IDxS nKR1Dyza9duMcnQ1lWyDmlekqTQTwLKg1zW48QWo1o1cFGw7hMxHEsw8mf9yji6D5crm YV19fYqGzg8PUP4M7fHMLFb207s/ZVVF5z76mt1PJ/K3HbLIX1q/rW2PJxJvzPsPhEH9 5zkyTTZQtEX3DTFHe164wbzIGfXNhwDsjICbWPPIEZD4t/1tQHRRbWGi9eOBiiYXlpMv lk5QPxFUwHEJB3KiI7k1djymCfFOxmXsojhnq10qiZEezq8fOhlL2ywfLqC9iTgY6w8t zM1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si4295368ede.118.2019.10.18.08.42.44; Fri, 18 Oct 2019 08:42:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505190AbfJRPmm (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:42 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:38657 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502043AbfJRPmi (ORCPT ); Fri, 18 Oct 2019 11:42:38 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M3UdI-1iM2cm1zbW-000bi3; Fri, 18 Oct 2019 17:42:22 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , alsa-devel@alsa-project.org Subject: [PATCH 10/46] ARM: pxa: pxa2xx-ac97-lib: use IRQ resource Date: Fri, 18 Oct 2019 17:41:25 +0200 Message-Id: <20191018154201.1276638-10-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ohXLc/rKHD3S0qlftz4r0qHFku7fe6p+1ct87Kb4VLl6S2fZF1V iGCq0WFspg+WijCvfLITNxSD/Wxoicw6WYyOj7Oew32wHt9rtFM4cZbUl6MFjgYnwS5aJwp gnY12Cf8fZ+beQoQBVvDnqYITrRIeU3MnbcDHDCb+osw0wruJFcEWNYc2htFYZdifop/Ijr aNUEF2uzfNwNBWZqoHDhQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:+5ta5rdfDEU=:cAi+iWvuqWj7bT0cLJh0d1 jB20bnFKegpC31k2ZLI5eH2UfPsYMwACCYdEORmmXOTWhJBllOslDxD5IeNy+5EtV6boYIiSP Qu9ToTNhpEJXM186zH94RpSoLPZiMHcUj3GKtnwz2aiT9BFJ9NgAYaDAkOpkUc1jlAPOAA+H7 2iCKyaoty5fBW8UdvHKcCeH4z0hfqedBTSw3W4bUKxQfJEeH9Vigmy/4yo1X3WGSGlnMrR9Us ttTz1f2JSaE8kYijcS0cS1efCLs/Vo8un5yKvAmkMZ7cDw6gQ1MRhK6JcKYOtZ5Ekvpd1lWu2 yma6lMIoGokc1yM5OGkD7iTDad1OkLlmb/ck0x/LdO292YGQxl4xOXL70mVapMLmESVKA5A1r LQmBDtotsjbz/HZBG/k1OZW8via4xXJxYWp8WYCXE1qXgqndM6TH4eClXYABy0l9ZMOMK7z1W QxnWBrQycoErlG5xd9fmY3jRqmAZcj+ys3XfBproU8Q01bTZV6keemePaXoIYdmSKInqpbHkF zAuNiGGyqPogbvRTigFf+m34Ua3iCpKxsRltBbC8KG8YLZNRxRYxxfzmZ8yEC6nntxdgiuxkS pEKrz6cf3856i9E2Cyhq4XGMutylHcn+0PzSY2nyNWAtNrAHI6WmpuRJ2doI1fRSeFYAaTaiM 3fnUu+4xerpLucJ3i5bDuo+23x3B1/QvCkGzic/i6D3+mLjygLuvxPEkVX7+XTqt5QShkxMxU lvOghBI8NsW5Q+0YKNM3V5FdMbW+N7wiNumgVoiXhXxRBDMW3Xl6TMZN9eZ2OlUNZTyXPHCw2 H/5NdjtQYgnr1D78grhXvf4QML7HDCJqyezKQ/2w7BCE0OaK50xmO58vNIqmBH0ob8Cce7Jgg Zdt5GCT5KmIRVpERms6w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pxa2xx-ac97-lib code is the last driver to use mach/irqs.h for PXA. Almost everything already passes the interrupt as a resource, so use it from there. The one exception is the mxm8x10 machine, which apparently has a resource-less device. Replacing it with the correct one enables the driver here as well. Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann Acked-by: Robert Jarzmik --- arch/arm/mach-pxa/mxm8x10.c | 8 ++------ sound/arm/pxa2xx-ac97-lib.c | 10 +++++++--- 2 files changed, 9 insertions(+), 9 deletions(-) -- 2.20.0 diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c index fde386f6cffe..35546b59c88e 100644 --- a/arch/arm/mach-pxa/mxm8x10.c +++ b/arch/arm/mach-pxa/mxm8x10.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "pxa320.h" #include "mxm8x10.h" @@ -356,14 +357,9 @@ void __init mxm_8x10_usb_host_init(void) pxa_set_ohci_info(&mxm_8x10_ohci_platform_data); } -/* AC97 Sound Support */ -static struct platform_device mxm_8x10_ac97_device = { - .name = "pxa2xx-ac97" -}; - void __init mxm_8x10_ac97_init(void) { - platform_device_register(&mxm_8x10_ac97_device); + pxa_set_ac97_info(NULL); } /* NAND flash Support */ diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 9b5c1f0f8998..8c79d224f03b 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c @@ -21,7 +21,6 @@ #include -#include #include #include @@ -319,6 +318,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_resume); int pxa2xx_ac97_hw_probe(struct platform_device *dev) { int ret; + int irq; pxa2xx_audio_ops_t *pdata = dev->dev.platform_data; if (pdata) { @@ -387,7 +387,11 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev) if (ret) goto err_clk2; - ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, 0, "AC97", NULL); + irq = platform_get_irq(dev, 0); + if (!irq) + goto err_irq; + + ret = request_irq(irq, pxa2xx_ac97_irq, 0, "AC97", NULL); if (ret < 0) goto err_irq; @@ -413,7 +417,7 @@ void pxa2xx_ac97_hw_remove(struct platform_device *dev) if (cpu_is_pxa27x()) gpio_free(reset_gpio); GCR |= GCR_ACLINK_OFF; - free_irq(IRQ_AC97, NULL); + free_irq(platform_get_irq(dev, 0), NULL); if (ac97conf_clk) { clk_put(ac97conf_clk); ac97conf_clk = NULL; From patchwork Fri Oct 18 15:41:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176884 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1032767ill; Fri, 18 Oct 2019 08:44:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmtBwJ3ZGGwDA75aceMS0u/+SNGD3rdZAPkPSQx/5arnNcweAQQ0GOOuNftZi+02uvgWDt X-Received: by 2002:a17:906:3488:: with SMTP id g8mr9162134ejb.162.1571413492713; Fri, 18 Oct 2019 08:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413492; cv=none; d=google.com; s=arc-20160816; b=gj0R5Vt/ihHm1eF8P2GNHvhjBsq3M+IBjAxu8Z2Lc9WF6aIYlMhslUI+O23ILCNUvY FNu/r50egX47t/cmP9CpKS74mVmZTtodWhbKsDk+nivq8+h3jAW4pSPx+hJTWKeTSvNu iyBn4Vy4viNzueD2sIyE0YpSoQrs+tBeJWezLMcKC/S0DeNMZ+H+ZlcdlGd+i1LfM1bX D80e2GiHFruhcoozyso1MDo6GvD05Aq1Wmo1T0h3QabY59E3ia4N5S7gJ58RCvmnfxEj PVVhKGpcJZNuXtf63CjtTDH/eSscrrCbVMi5H3LsMcK9XiOQu43SlDOKsNyk385ZUJY0 TVyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=GBrgdZdTtHbbKprCCVYUPZ8m6GK5+p1JcM6cL3gdfqQ=; b=gIbiwWIWvIA03A0eIn1bmCi0RmLlSnfnaLIpseDCHzuufugA2VA2aJXysMO5qDtV0g GdyBXkxoJAJDUr0UlCfwTApOhSWHATYMGH1iie+FoZZzzhbgnp/2lVQVkoPpgRNMX3U4 ButjkleDmSCvWFh+iuKmcKSqY4/Gcinso6pT1IzT6qica38cTnFYqpB5ObVFz3/HOUlD cetLKB7QKXkMB1bFXfOZmqeUj/EXmKoVWusqmiudGGMlySzJWRyAuzcj0KkTi+YzTM4W wtpz3Tx0hHbkqxHdGQR0PgXskxjojLFOA9mGsJzbURkdqAjJ2CPFS2sRqiZV5hlXWgZw mXYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si4196420eda.222.2019.10.18.08.44.52; Fri, 18 Oct 2019 08:44:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505495AbfJRPoq (ORCPT + 26 others); Fri, 18 Oct 2019 11:44:46 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:50459 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505164AbfJRPmk (ORCPT ); Fri, 18 Oct 2019 11:42:40 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1N33AR-1htWxG247x-013P60; Fri, 18 Oct 2019 17:42:23 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Vignesh Raghavendra , linux-mtd@lists.infradead.org Subject: [PATCH 11/46] ARM: pxa: cmx270: use platform device for nand Date: Fri, 18 Oct 2019 17:41:26 +0200 Message-Id: <20191018154201.1276638-11-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:AbuR27vzvwqTV64dzM3JZRxK8+Uh7OaKfpyn+sIT526ScJjmzmK JIJ7LTt+coUJgOsnQwlmCuxVOTtwZTHIFaEmlH7gkm/oxGXEWGKHiHSSjwxG05JZ9zmCL2f nyZ9BJcO99q/LJ6sLR9iDukJXjZznJhvvPK3Q+fjryuiX+0vktVBhsBkwCHvAEsxvI5YUOm Sz3dS9H0qPVlK5FG3CjoQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:l2PtyoVwGKc=:+0UEgTT2WSPL5NZ6La/kPz DHmB450niREfEPyFYAmQeTXByU0r3y2AE91V1gd21WSqwlhgnuOR1J0ph5In0M1ZrAvR+HN18 UjDM5XG4d+1SoYl+AMm7duwpjCH9Qh9FigBmRXr2zzSlAWObwWI2GBiWhRf0svOpiLnFJipOm wnhQoVDcOnbCYFFNjxR+vlA8/Uqi8LDRXsFU62jSQNDck7MAbwe0UAkjeKzoQZ+uXHFn1fbw3 ebVXOSacNAHlioTZgCEOOiALKXl2rkyuhf5aOl/R/iyEC1T+yM4YrfdrhR/JCxxUYWcUBJRG4 PaoQpkISkiKX2VJDMLvXy84shXMYREoDOYZoVAgRnBd2rQv6kMQYhdxrOcwjGKP122/1ZDPSQ wxuP3rvoP7eu6MQD4YUOrUTteACUg6X4sbqgseaE2cP3+RYbVKjNScT/C99qd1bLJJS1it8Ea NUDBqPBIIgAP+nZurYQEhlLtWQJKDNFbTiZp6TuyBBSbI9MLb2M/ICKcxddt2AbTaJBvT4V8Z U5CECnKrQ2LotmlpizOTtf1xNJn7To3sYvMXDJ5GBhbOqjlfxLgg2nsMcRGtFtLl9Y2AZ2Mq8 EBDiZ+14CfRIAEY/rmMpMJnr5fzDP4wyN/06P6mUUagvOIKsHdSLoRQuWCUPdXYrPlW5t0iBW AzXkE9Lee68P3GxF01Dy3/d7cNPHSADY1NRiEf1GyRKb5RI01eREEliDC5tzHHakmKlh+3jb1 TeWeMUHBxXIsCgqgjqsTTH4hNC/Pm9kGFBdx2YngifU3fYK4xsL1x0luFLt591VEJarvlod1b Fm6SpJWE7rXJxCkPIrtdyMeudmH2lWJnKoN+1qkAdWGdzSOhAmJvFdFZPcMVagyGjFMK08tV6 bwZe2eB6qhQFuQjQ1rTg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver traditionally hardcodes the MMIO register address and the GPIO numbers from data defined in platform header files. To make it indepdendent of that, use a memory resource for the registers, and a gpio lookup table to replace the gpio numbers. Cc: Miquel Raynal Cc: Richard Weinberger Cc: David Woodhouse Cc: Brian Norris Cc: Marek Vasut Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/cm-x270.c | 25 +++++++++ drivers/mtd/nand/raw/cmx270_nand.c | 88 +++++++++++------------------- 2 files changed, 56 insertions(+), 57 deletions(-) -- 2.20.0 Acked-by: Miquel Raynal Acked-by: Robert Jarzmik diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c index 9baad11314f2..6d80400d8887 100644 --- a/arch/arm/mach-pxa/cm-x270.c +++ b/arch/arm/mach-pxa/cm-x270.c @@ -40,6 +40,10 @@ #define GPIO19_WLAN_STRAP (19) #define GPIO102_WLAN_RST (102) +/* NAND GPIOS */ +#define GPIO_NAND_CS (11) +#define GPIO_NAND_RB (89) + static unsigned long cmx270_pin_config[] = { /* AC'97 */ GPIO28_AC97_BITCLK, @@ -403,6 +407,26 @@ static void __init cmx270_init_spi(void) static inline void cmx270_init_spi(void) {} #endif +static struct gpiod_lookup_table cmx270_nand_gpio_table = { + .dev_id = "cmx270-nand", + .table = { + GPIO_LOOKUP("gpio-pxa", GPIO_NAND_CS, "cs", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio-pxa", GPIO_NAND_RB, "rb", GPIO_ACTIVE_HIGH), + { }, + }, +}; + +static struct resource cmx270_nand_resources[] __initdata = { + DEFINE_RES_MEM(PXA_CS1_PHYS, 12), +}; + +static void __init cmx270_init_nand(void) +{ + platform_device_register_simple("cmx270-nand", -1, + cmx270_nand_resources, 1); + gpiod_add_lookup_table(&cmx270_nand_gpio_table); +} + void __init cmx270_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx270_pin_config)); @@ -416,4 +440,5 @@ void __init cmx270_init(void) cmx270_init_ohci(); cmx270_init_2700G(); cmx270_init_spi(); + cmx270_init_nand(); } diff --git a/drivers/mtd/nand/raw/cmx270_nand.c b/drivers/mtd/nand/raw/cmx270_nand.c index 7af3d0bdcdb8..31cb20858c46 100644 --- a/drivers/mtd/nand/raw/cmx270_nand.c +++ b/drivers/mtd/nand/raw/cmx270_nand.c @@ -15,18 +15,17 @@ #include #include #include -#include +#include #include #include +#include #include #include #include -#include - -#define GPIO_NAND_CS (11) -#define GPIO_NAND_RB (89) +static struct gpio_desc *gpiod_nand_cs; +static struct gpio_desc *gpiod_nand_rb; /* MTD structure for CM-X270 board */ static struct mtd_info *cmx270_nand_mtd; @@ -70,14 +69,14 @@ static void cmx270_read_buf(struct nand_chip *this, u_char *buf, int len) static inline void nand_cs_on(void) { - gpio_set_value(GPIO_NAND_CS, 0); + gpiod_set_value(gpiod_nand_cs, 0); } static void nand_cs_off(void) { dsb(); - gpio_set_value(GPIO_NAND_CS, 1); + gpiod_set_value(gpiod_nand_cs, 1); } /* @@ -120,48 +119,41 @@ static int cmx270_device_ready(struct nand_chip *this) { dsb(); - return (gpio_get_value(GPIO_NAND_RB)); + return (gpiod_get_value(gpiod_nand_rb)); } /* * Main initialization routine */ -static int __init cmx270_init(void) +static int cmx270_probe(struct platform_device *pdev) { struct nand_chip *this; + struct device *dev = &pdev->dev; int ret; - if (!(machine_is_armcore() && cpu_is_pxa27x())) - return -ENODEV; - - ret = gpio_request(GPIO_NAND_CS, "NAND CS"); + gpiod_nand_cs = devm_gpiod_get(dev, "cs", GPIOD_OUT_HIGH); + ret = PTR_ERR_OR_ZERO(gpiod_nand_cs); if (ret) { pr_warn("CM-X270: failed to request NAND CS gpio\n"); return ret; } - gpio_direction_output(GPIO_NAND_CS, 1); - - ret = gpio_request(GPIO_NAND_RB, "NAND R/B"); + gpiod_nand_rb = devm_gpiod_get(dev, "rb", GPIOD_IN); + ret = PTR_ERR_OR_ZERO(gpiod_nand_rb); if (ret) { pr_warn("CM-X270: failed to request NAND R/B gpio\n"); - goto err_gpio_request; + return ret; } - gpio_direction_input(GPIO_NAND_RB); - /* Allocate memory for MTD device structure and private data */ - this = kzalloc(sizeof(struct nand_chip), GFP_KERNEL); - if (!this) { - ret = -ENOMEM; - goto err_kzalloc; - } + this = devm_kzalloc(dev, sizeof(struct nand_chip), GFP_KERNEL); + if (!this) + return -ENOMEM; - cmx270_nand_io = ioremap(PXA_CS1_PHYS, 12); + cmx270_nand_io = devm_platform_ioremap_resource(pdev, 0); if (!cmx270_nand_io) { pr_debug("Unable to ioremap NAND device\n"); - ret = -EINVAL; - goto err_ioremap; + return -EINVAL; } cmx270_nand_mtd = nand_to_mtd(this); @@ -189,48 +181,30 @@ static int __init cmx270_init(void) ret = nand_scan(this, 1); if (ret) { pr_notice("No NAND device\n"); - goto err_scan; + return ret; } /* Register the partitions */ - ret = mtd_device_register(cmx270_nand_mtd, partition_info, - NUM_PARTITIONS); - if (ret) - goto err_scan; - - /* Return happy */ - return 0; - -err_scan: - iounmap(cmx270_nand_io); -err_ioremap: - kfree(this); -err_kzalloc: - gpio_free(GPIO_NAND_RB); -err_gpio_request: - gpio_free(GPIO_NAND_CS); - - return ret; - + return mtd_device_register(cmx270_nand_mtd, partition_info, + NUM_PARTITIONS); } -module_init(cmx270_init); /* * Clean up routine */ -static void __exit cmx270_cleanup(void) +static int cmx270_remove(struct platform_device *pdev) { - /* Release resources, unregister device */ nand_release(mtd_to_nand(cmx270_nand_mtd)); - gpio_free(GPIO_NAND_RB); - gpio_free(GPIO_NAND_CS); - - iounmap(cmx270_nand_io); - - kfree(mtd_to_nand(cmx270_nand_mtd)); + return 0; } -module_exit(cmx270_cleanup); + +static struct platform_driver cmx270_nand_driver = { + .driver.name = "cmx270-nand", + .probe = cmx270_probe, + .remove = cmx270_remove, +}; +module_platform_driver(cmx270_nand_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Mike Rapoport "); From patchwork Fri Oct 18 15:41:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176878 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1032217ill; Fri, 18 Oct 2019 08:44:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPRvdgvGI/CHq7BX+iEW1zKP+XxmgRDdupSPjk/G2evOENh5B8t3nxx13kN74tMcr9FAxX X-Received: by 2002:a17:906:1343:: with SMTP id x3mr9374399ejb.113.1571413463734; Fri, 18 Oct 2019 08:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413463; cv=none; d=google.com; s=arc-20160816; b=C6JEK57wgSuFEXiGz7oASN01b5AXE9XJdDYMFCYmfW5Eghp7O6zs8FU79ASlQYPABb Um4HjXrIA7iiJsTzK7My8xeABCZOrg4fNesOtBFvSOMUcqYevZaQLP/mpIORuCPLEa0H vcHYhVbUP6tVVfyaIxK5veGZbuEjq5eV7Ij8ujn6dxXbFXb1NoQ1U5yO+s5reBXbX+yA 89+7YRIIZDEjmPW+sjT1N7fTx6r5UVxiUW3sh5QQMtqNOhrALzy4xrnkx7FCPR2Agz0Y IiPJYC0+xiWhIv3O6vTKucwrZRfRqP++q1WcudSi/3p8kSJHINqGdT9Bw9jkvJT6UdzQ qXDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Gskbe0ek64EjjfcZWnwv1nx2QJ0Y4q+8jR2A4uaA3/w=; b=0qTDSgzXnG4cXdKbzbNGTSwtaAwI/LiU9OVl+uVY71eTWNn1lrrjdksX2PgOizyXhY Ud4N0w6K3SrN+CgPMAA1tKa97edzUqJY0WBJvZDfAoEVsWdwkZYNUydM0+OT+gWTtnnu 1BXOCWSXvTpggzFgwHu3LMB2gAz6yTteExGpN93PsD0TiSi+d97kPlZRejOBbY1KVBq1 K7QkcqbOqY4wUNipJiZcWCnIHxwptjI06vbNWD8gjcz01mbox11CqJZlwNc+Xou3c08o RzZSdM/qnqybGiseeLarFu50kfy+k5iDkw1rRZWzPYB++f7X4oB+iPJ3eV+RQ5UFqkSz iNDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si3703694ejs.414.2019.10.18.08.44.23; Fri, 18 Oct 2019 08:44:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505440AbfJRPoO (ORCPT + 26 others); Fri, 18 Oct 2019 11:44:14 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:43561 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408937AbfJRPmm (ORCPT ); Fri, 18 Oct 2019 11:42:42 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MhDAi-1hr5aP3RY2-00eKEx; Fri, 18 Oct 2019 17:42:23 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Philipp Zabel , Paul Parsons Subject: [PATCH 12/46] ARM: pxa: make addr-map.h header local Date: Fri, 18 Oct 2019 17:41:27 +0200 Message-Id: <20191018154201.1276638-12-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:8WoOYpFjU7VWVDju/eEJLMj2+XGDEzE9YwdV9g62F5wRGpwSEAH 9Nl2dp8EgqQjF6Bpzq+oxUNbh9GabQyK/XF9d5BFAPggcSEjWQLhw0vplYeToUl4PQeZMzY FfelPX9bKVQ5NPpxDdOMX18TmSVgdo9yaZNvAsnsC0rl5jGES262IvSTsgAgPubrYQiXv7h KMQhW1HIdgo1jC4JKkcOA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:KFSZbybX0NQ=:cAV3UCZ9dED3v79KGzQDQm jaaHcwMByoDbWGaLU5ipaA0BOTip1EFY4V8Hesrbv7uMZ/PnWXgXS2aJksblS8sE4NRZKJNcs j4q6Zt/OJ8QcCz4FR9AVYg0uPrY2an3H859SfijuswAeKa5CoZwHjxUzFQDa0mAOBwbh6NgSt uPI+qMONy824pAhEVbSUtxst/z5GOy127HTQbDYre6ru34vFk2M9HgDW6n7toBdqbN7xNwyG/ /0aT7HEqP99VHQ1KqLjuFo0NZ3XJyD2KfIduyaTPV2sZcnQicq8UO9FNyNDz5VpkE9P9Txdaj Hmkb30t0XuBYYsNlzScZ+qStcbQkklaAiPL8Z0VRkYAeaWmN5Diwo7fp6EnYuA0bhf2jCoE/h lpgyLtQZiNPyzvsO98LR73KaH8w31JVNE3xFJ2whPAEZMMxSE2DyhkiM72BAqTMcA/h7FZbxM nbcrRxtvp3f5rZPLYN+VPs4CRNyIjsPnN+kPDkSvuLk7bmwgOBZNGqlUaVxz4l1z6O0Ghwpac DwApcPvFcf4OFd657oh102WbBTd3vEoWt0lFseaNaT+S229sP+1kFzrjdS2rDDVBwEMYF7BLu 3iNNnqzjmoybdLBpe11BxYyLqTwv7r2xEcpoB5oQyNDl6Es1Eh8B3BxFVOxOtIDRxWcDTcM3j MJ7L9s5EOhp3EnZRx9+2I/ZFLe8ItdBe1qcnZb5I0+A58nmGJGVI3R+xxfUGkSIOey5ja4Y2O 91Su67sVpcAqwijNukO8Sd529hx20gtGEejU5e9bs14ymMuo89A9EgCtxADPxVJsh27qZ30hh dNXHU85MeLZVIC67Mqm6FKJtLSpBOeklcws3M/CniR/Lq2rilJHViR7LdiMR4Mi1iZgL+lxAf ycDCeFzRlJg8YoQhiPNQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drivers should not rely on the contents of this file, so move it into the platform directory directly. Cc: Philipp Zabel Cc: Paul Parsons Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/{include/mach => }/addr-map.h | 0 arch/arm/mach-pxa/cm-x2xx.c | 2 +- arch/arm/mach-pxa/generic.c | 2 +- arch/arm/mach-pxa/hx4700.c | 2 +- arch/arm/mach-pxa/include/mach/trizeps4.h | 2 +- arch/arm/mach-pxa/lpd270.c | 2 +- arch/arm/mach-pxa/magician.c | 2 +- arch/arm/mach-pxa/mainstone.c | 2 +- arch/arm/mach-pxa/pxa25x.c | 2 +- arch/arm/mach-pxa/pxa25x.h | 2 +- arch/arm/mach-pxa/pxa27x.c | 2 +- arch/arm/mach-pxa/pxa27x.h | 2 +- arch/arm/mach-pxa/pxa3xx.c | 2 +- arch/arm/mach-pxa/pxa3xx.h | 2 +- arch/arm/mach-pxa/xcep.c | 2 +- 15 files changed, 14 insertions(+), 14 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/addr-map.h (100%) -- 2.20.0 diff --git a/arch/arm/mach-pxa/include/mach/addr-map.h b/arch/arm/mach-pxa/addr-map.h similarity index 100% rename from arch/arm/mach-pxa/include/mach/addr-map.h rename to arch/arm/mach-pxa/addr-map.h diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index b13fcc72abab..9b030eccd548 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c @@ -33,7 +33,7 @@ #undef GPIO88_GPIO #undef GPIO89_GPIO #include -#include +#include "addr-map.h" #include #include diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 3c3cd90bb9b4..f9083c4f0aea 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -22,7 +22,7 @@ #include #include -#include +#include "addr-map.h" #include #include #include diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 4dce8834c5b6..b3dcbe291e13 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -41,7 +41,7 @@ #include #include "pxa27x.h" -#include +#include "addr-map.h" #include #include diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/include/mach/trizeps4.h index 27926629f9c6..b6c19d155ef9 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/include/mach/trizeps4.h @@ -11,7 +11,7 @@ #ifndef _TRIPEPS4_H_ #define _TRIPEPS4_H_ -#include +#include "addr-map.h" #include "irqs.h" /* PXA_GPIO_TO_IRQ */ /* physical memory regions */ diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index c59fd2624f91..6f3b7ca4d899 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c @@ -38,7 +38,7 @@ #include "pxa27x.h" #include "lpd270.h" -#include +#include "addr-map.h" #include #include #include diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index ce4c677be868..e925f7a8d349 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -35,7 +35,7 @@ #include #include "pxa27x.h" -#include +#include "addr-map.h" #include #include #include diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index ed505de6b5d9..5f7bc5a9215e 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c @@ -51,7 +51,7 @@ #include #include #include -#include +#include "addr-map.h" #include #include "generic.h" diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index dfc90b41fba3..8d21c7eef1d2 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -34,7 +34,7 @@ #include "pxa25x.h" #include #include "pm.h" -#include +#include "addr-map.h" #include #include "generic.h" diff --git a/arch/arm/mach-pxa/pxa25x.h b/arch/arm/mach-pxa/pxa25x.h index 403bc16c2ed2..4699ebf7b486 100644 --- a/arch/arm/mach-pxa/pxa25x.h +++ b/arch/arm/mach-pxa/pxa25x.h @@ -2,7 +2,7 @@ #ifndef __MACH_PXA25x_H #define __MACH_PXA25x_H -#include +#include "addr-map.h" #include #include "mfp-pxa25x.h" #include diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 38fdd22c4dc5..c36a9784fab8 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -33,7 +33,7 @@ #include #include #include "pm.h" -#include +#include "addr-map.h" #include #include "generic.h" diff --git a/arch/arm/mach-pxa/pxa27x.h b/arch/arm/mach-pxa/pxa27x.h index 6c99090647d2..bf2755561fe5 100644 --- a/arch/arm/mach-pxa/pxa27x.h +++ b/arch/arm/mach-pxa/pxa27x.h @@ -3,7 +3,7 @@ #define __MACH_PXA27x_H #include -#include +#include "addr-map.h" #include #include "mfp-pxa27x.h" #include diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 7c569fa2a6da..7881888107c7 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -32,7 +32,7 @@ #include #include #include "pm.h" -#include +#include "addr-map.h" #include #include diff --git a/arch/arm/mach-pxa/pxa3xx.h b/arch/arm/mach-pxa/pxa3xx.h index 22ace053ea25..6b424d328680 100644 --- a/arch/arm/mach-pxa/pxa3xx.h +++ b/arch/arm/mach-pxa/pxa3xx.h @@ -2,7 +2,7 @@ #ifndef __MACH_PXA3XX_H #define __MACH_PXA3XX_H -#include +#include "addr-map.h" #include #include diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c index e6ab428287ae..7389e0199144 100644 --- a/arch/arm/mach-pxa/xcep.c +++ b/arch/arm/mach-pxa/xcep.c @@ -25,7 +25,7 @@ #include #include "pxa25x.h" -#include +#include "addr-map.h" #include #include "generic.h" From patchwork Fri Oct 18 15:41:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176869 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1031525ill; Fri, 18 Oct 2019 08:43:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQ/ZcEitUyo4jfAYjNQ1cOjwPyppWiZy5gnKFWBwb+OZmQSFKycDmvHE9XmX6kcrqsWggj X-Received: by 2002:a50:d615:: with SMTP id x21mr10355152edi.297.1571413430836; Fri, 18 Oct 2019 08:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413430; cv=none; d=google.com; s=arc-20160816; b=jFJ5rd97jmMPCfHrXdzYmMc+5twteAtSxqt44lfSL5UJooxz5Ns5WDuWqABQ9NtFfj iPAapwglXDq4pPNukSZ2K19/HGUWu8oAlC5iz6sfyeor/ZEw+1pAwRQ0WY6Kj5N/F2XD Z9A1c34XFJM0X/9sXJWW97fZtPOY4KwJJ3AlsJaxrmgaBfAfBR5MGOofzXqDNPWwAlO+ yxHTsuKxBsXiw0sYxE7bBZMIw2wLEpIsWMo7TwV+loEH8izuvn0pGMykdGhZDnZOuCQr Yd5TB3ZeFmYkVHPClQ9umYj7eAveTmnYAI8S5FmS+rxlzKWMsizk5pFYIjTMcAt+ALuw b1MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=NKD6Oew4aqzlUBMVnZCFQNPrfGYI7b6I9P8RJNozVZE=; b=PFur9eSm3frizMkfjnTmkOdBBtBES1mHCOsq3vpfRbONUM/A2jU79y2zfRlHP41RHP 8RJNw8HwmZaVH+T7WxVoGNU0NrKSe80wg/N1LxmloTOH+GvN/oaLQz1LCohoxpU1fw4L S5qzWYgOfXPfTaKWC91Z3wdf5TiwVFJjFk7Gi0br3yGWS292FJvM02eRi87OfKxhxAcv AiUG0164iyRC0TIck8eLTVpBjDn4NEArw3ke3bBMcREMUjJYMhDtUZv6LJNtpkKfYULW b0rmO/3ciWp66QRKKNnZ1xnWot9JsjZ//YzRYR+DBz/0N502EtJuDa0YNXfa9r7SJLcB w1TQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si3880205edv.21.2019.10.18.08.43.50; Fri, 18 Oct 2019 08:43:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505371AbfJRPnt (ORCPT + 26 others); Fri, 18 Oct 2019 11:43:49 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:43027 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505175AbfJRPmq (ORCPT ); Fri, 18 Oct 2019 11:42:46 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M8hR1-1iPb050sLZ-004iJ2; Fri, 18 Oct 2019 17:42:24 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Marek Vasut , Dominik Brodowski , Jonathan Cameron Subject: [PATCH 13/46] ARM: pxa: move pcmcia board data into mach-pxa Date: Fri, 18 Oct 2019 17:41:28 +0200 Message-Id: <20191018154201.1276638-13-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:zh7l+1kSKRq16jgGH/awTtet7fahFklX9NZ13c8nrsEXMSOllEv BqyXztif/VecIoxEVkWvyfzZ9CsiqDRuSt2PaPJB5Tuvc4rTyBeLM+mbp31uhLDEgifwgTW dZbQM1/EWjnEtN6UGW4LG3/588Mr6w+YsuQwNZsAzINa8qQsQ85A/UGOuwObgVczsrhdLOJ QOnkM3S36Q8qwIo3Tbefw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:d8Imx1Egy88=:yh6uY5FV0CfacxHyXfgDp+ hu7g9JJFOVnzKx3fjntu4gRBVhGeK2xbk+WKG9852gRW8Y22bocT2rOgqsojKfhBV0Vjk10q+ QM5bcOyo3K9A3Y6DBXB7SLECeSPQM/uO5xDAZEXEvgPReBwzPwH1sLNSMS5NvOnp8GpF9PurU 6fclowBOSZaXC1R9V0VSN+fFNSP/zqLSfeKRjyHfktcZTModpX9sj+sHjWjwpsqZKS7J5QzxB p4lUzppQ+ksHlxsqN7pfQ0Su2xXq0H6qdpNs1zYzw/MHWTbfGYm9MJEn5FC6FvnaRVSmdt9I2 oG2+SNOvb9m9d4+SupIVvkHan0/upyLISVAf0SaNu2gSnG08IYEaFBov84ac1fmCNcIRT7IZR Uz8BEMea6YXtfl+0sZE2naGS6xeNWk/6Q7zgotVb4ECj4zRzA8YQrJNE+vYXFX5X8pBYchdfI rzyMXwdp7pOsXFFcqK1aQrSx+Aod97TccjZa7temPJKvhY9+mgOGz+iqJ4nmxq/8EPI9nP5Py i3GjGc/OAK6XdvQRxvBA9Jc62uNq1LPApufO3Fq+ZU30WIRHIUQICC11u2PtcJLPp10ejaXk9 EKuMo6KMwkiisKnbwr4BN96QZOb8/lY0qgmdG49SptMI3EuqES4+2S7Oeie20HI8AOedwdrYk 2uH58tSBHAkGxJMtm9x5ssVwATwx8wXXNRD2YqTpXVf40dZpHjC6Xc+Jzw54R4+/e0iscWy8V SloYgIuBuiflHoovovyD5MZDU2orTadEgiS0u8v88qLz4zcur8ye9xqCTGDWMYy1Adyjo6i9N fldYT2Gep4cP1NRy1XXd1I0pZyiGhKXqddxuyj8J0KT647AX4l7hy/CVejJlpq5XC+bTS0rWE yW0udJOiGYHtg/DGt4nA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The drivers/pcmcia/pxa2xx_*.c are essentially part of the board files, but for historic reasons located in drivers/pcmcia. Move them into the same place as the actual board file to avoid lots of machine header inclusions. Cc: Marek Vasut Cc: Dominik Brodowski Cc: Jonathan Cameron Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/Makefile | 21 +-- .../arm/mach-pxa/balloon3-pcmcia.c | 4 +- arch/arm/mach-pxa/balloon3.c | 2 +- .../mach-pxa/{include/mach => }/balloon3.h | 2 +- .../arm/mach-pxa/cm_x255-pcmcia.c | 2 +- .../arm/mach-pxa/cm_x270-pcmcia.c | 2 +- .../arm/mach-pxa/cm_x2xx-pcmcia.c | 0 .../arm/mach-pxa/colibri-pcmcia.c | 2 +- .../arm/mach-pxa/e740-pcmcia.c | 2 +- .../arm/mach-pxa/hx4700-pcmcia.c | 2 +- .../arm/mach-pxa/palmld-pcmcia.c | 2 +- .../arm/mach-pxa/palmtc-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtc.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtc.h | 2 +- .../arm/mach-pxa/palmtx-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtx.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtx.h | 2 +- .../arm/mach-pxa/stargate2-pcmcia.c | 2 +- .../arm/mach-pxa/trizeps4-pcmcia.c | 4 +- arch/arm/mach-pxa/trizeps4.c | 2 +- .../mach-pxa/{include/mach => }/trizeps4.h | 2 +- .../arm/mach-pxa/viper-pcmcia.c | 6 +- .../arm/mach-pxa/viper-pcmcia.h | 0 arch/arm/mach-pxa/viper.c | 2 +- .../arm/mach-pxa/vpac270-pcmcia.c | 4 +- arch/arm/mach-pxa/vpac270.c | 2 +- .../arm/mach-pxa/{include/mach => }/vpac270.h | 0 arch/arm/mach-pxa/zeus.c | 2 +- drivers/pcmcia/Makefile | 16 --- drivers/pcmcia/pxa2xx_sharpsl.c | 2 +- drivers/pcmcia/soc_common.h | 120 +---------------- include/pcmcia/soc_common.h | 125 ++++++++++++++++++ 32 files changed, 170 insertions(+), 176 deletions(-) rename drivers/pcmcia/pxa2xx_balloon3.c => arch/arm/mach-pxa/balloon3-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/balloon3.h (99%) rename drivers/pcmcia/pxa2xx_cm_x255.c => arch/arm/mach-pxa/cm_x255-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_cm_x270.c => arch/arm/mach-pxa/cm_x270-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_cm_x2xx.c => arch/arm/mach-pxa/cm_x2xx-pcmcia.c (100%) rename drivers/pcmcia/pxa2xx_colibri.c => arch/arm/mach-pxa/colibri-pcmcia.c (99%) rename drivers/pcmcia/pxa2xx_e740.c => arch/arm/mach-pxa/e740-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_hx4700.c => arch/arm/mach-pxa/hx4700-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmld.c => arch/arm/mach-pxa/palmld-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmtc.c => arch/arm/mach-pxa/palmtc-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtc.h (98%) rename drivers/pcmcia/pxa2xx_palmtx.c => arch/arm/mach-pxa/palmtx-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtx.h (98%) rename drivers/pcmcia/pxa2xx_stargate2.c => arch/arm/mach-pxa/stargate2-pcmcia.c (99%) rename drivers/pcmcia/pxa2xx_trizeps4.c => arch/arm/mach-pxa/trizeps4-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/trizeps4.h (99%) rename drivers/pcmcia/pxa2xx_viper.c => arch/arm/mach-pxa/viper-pcmcia.c (97%) rename include/linux/platform_data/pcmcia-pxa2xx_viper.h => arch/arm/mach-pxa/viper-pcmcia.h (100%) rename drivers/pcmcia/pxa2xx_vpac270.c => arch/arm/mach-pxa/vpac270-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/vpac270.h (100%) create mode 100644 include/pcmcia/soc_common.h -- 2.20.0 diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index f70728930c4f..e0df39b0238d 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -37,13 +37,15 @@ obj-$(CONFIG_MACH_SAAR) += saar.o obj-$(CONFIG_ARCH_PXA_IDP) += idp.o obj-$(CONFIG_ARCH_VIPER) += viper.o obj-$(CONFIG_MACH_ARCOM_ZEUS) += zeus.o -obj-$(CONFIG_MACH_BALLOON3) += balloon3.o +obj-$(CONFIG_ARCOM_PCMCIA) += viper-pcmcia.o +obj-$(CONFIG_MACH_BALLOON3) += balloon3.o balloon3-pcmcia.o obj-$(CONFIG_MACH_CSB726) += csb726.o obj-$(CONFIG_CSB726_CSB701) += csb701.o obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o ifeq ($(CONFIG_PCI),y) obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx-pci.o endif +obj-$(CONFIG_MACH_ARMCORE) += cm_x2xx-pcmcia.o cm_x255-pcmcia.o cm_x270-pcmcia.o obj-$(CONFIG_MACH_EM_X270) += em-x270.o obj-$(CONFIG_MACH_CM_X300) += cm-x300.o obj-$(CONFIG_MACH_CAPC7117) += capc7117.o mxm8x10.o @@ -51,21 +53,23 @@ obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o obj-$(CONFIG_MACH_INTELMOTE2) += stargate2.o -obj-$(CONFIG_MACH_STARGATE2) += stargate2.o +obj-$(CONFIG_MACH_STARGATE2) += stargate2.o stargate2-pcmcia.o obj-$(CONFIG_MACH_XCEP) += xcep.o obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o +obj-$(CONFIG_TRIZEPS_PCMCIA) += trizeps4-pcmcia.o obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o obj-$(CONFIG_MACH_PCM027) += pcm027.o obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o -obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o +obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o colibri-pcmcia.o obj-$(CONFIG_MACH_COLIBRI_EVALBOARD) += colibri-evalboard.o obj-$(CONFIG_MACH_COLIBRI_PXA270_INCOME) += colibri-pxa270-income.o obj-$(CONFIG_MACH_COLIBRI300) += colibri-pxa3xx.o colibri-pxa300.o -obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o -obj-$(CONFIG_MACH_VPAC270) += vpac270.o +obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o colibri-pcmcia.o +obj-$(CONFIG_MACH_VPAC270) += vpac270.o vpac270-pcmcia.o # End-user Products obj-$(CONFIG_MACH_H4700) += hx4700.o +obj-$(CONFIG_MACH_H4700) += hx4700-pcmcia.o obj-$(CONFIG_MACH_H5000) += h5000.o obj-$(CONFIG_MACH_HIMALAYA) += himalaya.o obj-$(CONFIG_MACH_MAGICIAN) += magician.o @@ -73,12 +77,12 @@ obj-$(CONFIG_MACH_MIOA701) += mioa701.o mioa701_bootresume.o obj-$(CONFIG_PXA_EZX) += ezx.o obj-$(CONFIG_MACH_MP900C) += mp900.o obj-$(CONFIG_MACH_PALMTE2) += palmte2.o -obj-$(CONFIG_MACH_PALMTC) += palmtc.o +obj-$(CONFIG_MACH_PALMTC) += palmtc.o palmtc-pcmcia.o obj-$(CONFIG_MACH_PALM27X) += palm27x.o obj-$(CONFIG_MACH_PALMT5) += palmt5.o -obj-$(CONFIG_MACH_PALMTX) += palmtx.o +obj-$(CONFIG_MACH_PALMTX) += palmtx.o palmtx-pcmcia.o obj-$(CONFIG_MACH_PALMZ72) += palmz72.o -obj-$(CONFIG_MACH_PALMLD) += palmld.o +obj-$(CONFIG_MACH_PALMLD) += palmld.o palmld-pcmcia.o obj-$(CONFIG_PALM_TREO) += palmtreo.o obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o @@ -86,6 +90,7 @@ obj-$(CONFIG_MACH_POODLE) += poodle.o obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o +obj-$(CONFIG_MACH_E740) += e740-pcmcia.o obj-$(CONFIG_MACH_ZIPIT2) += z2.o obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/arch/arm/mach-pxa/balloon3-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_balloon3.c rename to arch/arm/mach-pxa/balloon3-pcmcia.c index 5fe1da7a50e4..6a27b76cc603 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/arch/arm/mach-pxa/balloon3-pcmcia.c @@ -20,11 +20,11 @@ #include #include -#include +#include "balloon3.h" #include -#include "soc_common.h" +#include static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 82f9299f67d3..896d47d9a8dc 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "balloon3.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/balloon3.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/balloon3.h rename to arch/arm/mach-pxa/balloon3.h index 04f3639c4082..f351358c0e5b 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/balloon3.h @@ -11,7 +11,7 @@ #ifndef ASM_ARCH_BALLOON3_H #define ASM_ARCH_BALLOON3_H -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +#include /* PXA_NR_BUILTIN_GPIO */ enum balloon3_features { BALLOON3_FEATURE_OHCI, diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/arch/arm/mach-pxa/cm_x255-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_cm_x255.c rename to arch/arm/mach-pxa/cm_x255-pcmcia.c index c0b6b846fbaa..7f9f3c157210 100644 --- a/drivers/pcmcia/pxa2xx_cm_x255.c +++ b/arch/arm/mach-pxa/cm_x255-pcmcia.c @@ -12,7 +12,7 @@ #include #include -#include "soc_common.h" +#include #define GPIO_PCMCIA_SKTSEL (54) #define GPIO_PCMCIA_S0_CD_VALID (16) diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/arch/arm/mach-pxa/cm_x270-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_cm_x270.c rename to arch/arm/mach-pxa/cm_x270-pcmcia.c index 36e35da5f887..57c8cbb2f896 100644 --- a/drivers/pcmcia/pxa2xx_cm_x270.c +++ b/arch/arm/mach-pxa/cm_x270-pcmcia.c @@ -12,7 +12,7 @@ #include #include -#include "soc_common.h" +#include #define GPIO_PCMCIA_S0_CD_VALID (84) #define GPIO_PCMCIA_S0_RDYINT (82) diff --git a/drivers/pcmcia/pxa2xx_cm_x2xx.c b/arch/arm/mach-pxa/cm_x2xx-pcmcia.c similarity index 100% rename from drivers/pcmcia/pxa2xx_cm_x2xx.c rename to arch/arm/mach-pxa/cm_x2xx-pcmcia.c diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/arch/arm/mach-pxa/colibri-pcmcia.c similarity index 99% rename from drivers/pcmcia/pxa2xx_colibri.c rename to arch/arm/mach-pxa/colibri-pcmcia.c index f0f725e99604..9da7b478e5eb 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/arch/arm/mach-pxa/colibri-pcmcia.c @@ -14,7 +14,7 @@ #include -#include "soc_common.h" +#include #define COLIBRI270_RESET_GPIO 53 #define COLIBRI270_PPEN_GPIO 107 diff --git a/drivers/pcmcia/pxa2xx_e740.c b/arch/arm/mach-pxa/e740-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_e740.c rename to arch/arm/mach-pxa/e740-pcmcia.c index 72caa6d05ab9..133535d7ac05 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/arch/arm/mach-pxa/e740-pcmcia.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/drivers/pcmcia/pxa2xx_hx4700.c b/arch/arm/mach-pxa/hx4700-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_hx4700.c rename to arch/arm/mach-pxa/hx4700-pcmcia.c index 87b6a1639d94..e8acbfc9ef6c 100644 --- a/drivers/pcmcia/pxa2xx_hx4700.c +++ b/arch/arm/mach-pxa/hx4700-pcmcia.c @@ -12,7 +12,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio gpios[] = { { GPIO114_HX4700_CF_RESET, GPIOF_OUT_INIT_LOW, "CF reset" }, diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/arch/arm/mach-pxa/palmld-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmld.c rename to arch/arm/mach-pxa/palmld-pcmcia.c index cfff41ac9ca2..07e0f7438db1 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/arch/arm/mach-pxa/palmld-pcmcia.c @@ -14,7 +14,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio palmld_pcmcia_gpios[] = { { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/arch/arm/mach-pxa/palmtc-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtc.c rename to arch/arm/mach-pxa/palmtc-pcmcia.c index 8fe05613ed04..8e3f382343fe 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/arch/arm/mach-pxa/palmtc-pcmcia.c @@ -14,8 +14,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtc.h" +#include static struct gpio palmtc_pcmcia_gpios[] = { { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index 71917127dfdd..a3aa01d47472 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c @@ -31,7 +31,7 @@ #include "pxa25x.h" #include -#include +#include "palmtc.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/palmtc.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtc.h rename to arch/arm/mach-pxa/palmtc.h index 9257a02c46e5..afec057c2857 100644 --- a/arch/arm/mach-pxa/include/mach/palmtc.h +++ b/arch/arm/mach-pxa/palmtc.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTC_H_ #define _INCLUDE_PALMTC_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/arch/arm/mach-pxa/palmtx-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtx.c rename to arch/arm/mach-pxa/palmtx-pcmcia.c index c449ca72cb87..8c2aaad93043 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/arch/arm/mach-pxa/palmtx-pcmcia.c @@ -12,8 +12,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtx.h" +#include static struct gpio palmtx_pcmcia_gpios[] = { { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index eed25d09dfb2..d6819413a8d6 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -34,7 +34,7 @@ #include "pxa27x.h" #include -#include +#include "palmtx.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/palmtx.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtx.h rename to arch/arm/mach-pxa/palmtx.h index ec88abf0fc6c..a2bb993952d9 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/palmtx.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTX_H_ #define _INCLUDE_PALMTX_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_stargate2.c b/arch/arm/mach-pxa/stargate2-pcmcia.c similarity index 99% rename from drivers/pcmcia/pxa2xx_stargate2.c rename to arch/arm/mach-pxa/stargate2-pcmcia.c index 6efb7f814b4a..9b73487a4f24 100644 --- a/drivers/pcmcia/pxa2xx_stargate2.c +++ b/arch/arm/mach-pxa/stargate2-pcmcia.c @@ -23,7 +23,7 @@ #include #include -#include "soc_common.h" +#include #define SG2_S0_POWER_CTL 108 #define SG2_S0_GPIO_RESET 82 diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/arch/arm/mach-pxa/trizeps4-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_trizeps4.c rename to arch/arm/mach-pxa/trizeps4-pcmcia.c index 6db8fe880ed4..02d7bb0c538f 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4-pcmcia.c @@ -20,9 +20,9 @@ #include #include -#include +#include "trizeps4.h" -#include "soc_common.h" +#include extern void board_pcmcia_power(int power); diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 1337008cc760..fadfbb40cd6c 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "trizeps4.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/trizeps4.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/trizeps4.h rename to arch/arm/mach-pxa/trizeps4.h index b6c19d155ef9..e0f37c0ff06f 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/trizeps4.h @@ -12,7 +12,7 @@ #define _TRIPEPS4_H_ #include "addr-map.h" -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /* physical memory regions */ #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ diff --git a/drivers/pcmcia/pxa2xx_viper.c b/arch/arm/mach-pxa/viper-pcmcia.c similarity index 97% rename from drivers/pcmcia/pxa2xx_viper.c rename to arch/arm/mach-pxa/viper-pcmcia.c index 7ac6647d286e..26599dcc49b3 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/arch/arm/mach-pxa/viper-pcmcia.c @@ -22,13 +22,11 @@ #include #include +#include #include -#include - -#include "soc_common.h" -#include "pxa2xx_base.h" +#include "viper-pcmcia.h" static struct platform_device *arcom_pcmcia_dev; diff --git a/include/linux/platform_data/pcmcia-pxa2xx_viper.h b/arch/arm/mach-pxa/viper-pcmcia.h similarity index 100% rename from include/linux/platform_data/pcmcia-pxa2xx_viper.h rename to arch/arm/mach-pxa/viper-pcmcia.h diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 7d1cb2c2dfa1..fe74ee266871 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -49,7 +49,7 @@ #include #include #include "regs-uart.h" -#include +#include "viper-pcmcia.h" #include "viper.h" #include diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/arch/arm/mach-pxa/vpac270-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_vpac270.c rename to arch/arm/mach-pxa/vpac270-pcmcia.c index 3565add03a5e..9fd990c8a5fb 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/arch/arm/mach-pxa/vpac270-pcmcia.c @@ -13,9 +13,9 @@ #include -#include +#include "vpac270.h" -#include "soc_common.h" +#include static struct gpio vpac270_pcmcia_gpios[] = { { GPIO107_VPAC270_PCMCIA_PPEN, GPIOF_INIT_LOW, "PCMCIA PPEN" }, diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 7abbebc5d455..5adb053a293e 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c @@ -31,7 +31,7 @@ #include "pxa27x.h" #include -#include +#include "vpac270.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/vpac270.h similarity index 100% rename from arch/arm/mach-pxa/include/mach/vpac270.h rename to arch/arm/mach-pxa/vpac270.h diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 6652b1e5978e..80c2bf6e1d30 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -47,7 +47,7 @@ #include #include "pm.h" #include -#include +#include "viper-pcmcia.h" #include "zeus.h" #include diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index 01779c5c45f3..1bd5fd1db6db 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -49,23 +49,7 @@ sa1100_cs-$(CONFIG_SA1100_H3100) += sa1100_h3600.o sa1100_cs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o -pxa2xx_cm_x2xx_cs-y += pxa2xx_cm_x2xx.o pxa2xx_cm_x255.o pxa2xx_cm_x270.o pxa2xx-obj-$(CONFIG_MACH_MAINSTONE) += pxa2xx_mainstone.o pxa2xx-obj-$(CONFIG_PXA_SHARPSL) += pxa2xx_sharpsl.o -pxa2xx-obj-$(CONFIG_MACH_ARMCORE) += pxa2xx_cm_x2xx_cs.o -pxa2xx-obj-$(CONFIG_ARCOM_PCMCIA) += pxa2xx_viper.o -pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA) += pxa2xx_trizeps4.o -pxa2xx-obj-$(CONFIG_MACH_PALMTX) += pxa2xx_palmtx.o -pxa2xx-obj-$(CONFIG_MACH_PALMTC) += pxa2xx_palmtc.o -pxa2xx-obj-$(CONFIG_MACH_PALMLD) += pxa2xx_palmld.o -pxa2xx-obj-$(CONFIG_MACH_E740) += pxa2xx_e740.o -pxa2xx-obj-$(CONFIG_MACH_STARGATE2) += pxa2xx_stargate2.o -pxa2xx-obj-$(CONFIG_MACH_VPAC270) += pxa2xx_vpac270.o -pxa2xx-obj-$(CONFIG_MACH_BALLOON3) += pxa2xx_balloon3.o -pxa2xx-obj-$(CONFIG_MACH_COLIBRI) += pxa2xx_colibri.o -pxa2xx-obj-$(CONFIG_MACH_COLIBRI320) += pxa2xx_colibri.o -pxa2xx-obj-$(CONFIG_MACH_H4700) += pxa2xx_hx4700.o - obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_base.o $(pxa2xx-obj-y) - obj-$(CONFIG_PCMCIA_XXS1500) += xxs1500_ss.o diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 66fe1d1af12a..b3ba858f70cb 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include #define NO_KEEP_VS 0x0001 #define SCOOP_DEV platform_scoop_config->devs diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index b7f993f1bbd0..6476db67e31b 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h @@ -13,137 +13,19 @@ /* include the world */ #include #include -#include #include - +#include struct device; struct gpio_desc; struct pcmcia_low_level; struct regulator; -struct soc_pcmcia_regulator { - struct regulator *reg; - bool on; -}; - -/* - * This structure encapsulates per-socket state which we might need to - * use when responding to a Card Services query of some kind. - */ -struct soc_pcmcia_socket { - struct pcmcia_socket socket; - - /* - * Info from low level handler - */ - unsigned int nr; - struct clk *clk; - - /* - * Core PCMCIA state - */ - const struct pcmcia_low_level *ops; - - unsigned int status; - socket_state_t cs_state; - - unsigned short spd_io[MAX_IO_WIN]; - unsigned short spd_mem[MAX_WIN]; - unsigned short spd_attr[MAX_WIN]; - - struct resource res_skt; - struct resource res_io; - struct resource res_mem; - struct resource res_attr; - void __iomem *virt_io; - - struct { - int gpio; - struct gpio_desc *desc; - unsigned int irq; - const char *name; - } stat[6]; -#define SOC_STAT_CD 0 /* Card detect */ -#define SOC_STAT_BVD1 1 /* BATDEAD / IOSTSCHG */ -#define SOC_STAT_BVD2 2 /* BATWARN / IOSPKR */ -#define SOC_STAT_RDY 3 /* Ready / Interrupt */ -#define SOC_STAT_VS1 4 /* Voltage sense 1 */ -#define SOC_STAT_VS2 5 /* Voltage sense 2 */ - - struct gpio_desc *gpio_reset; - struct gpio_desc *gpio_bus_enable; - struct soc_pcmcia_regulator vcc; - struct soc_pcmcia_regulator vpp; - - unsigned int irq_state; - -#ifdef CONFIG_CPU_FREQ - struct notifier_block cpufreq_nb; -#endif - struct timer_list poll_timer; - struct list_head node; - void *driver_data; -}; - struct skt_dev_info { int nskt; struct soc_pcmcia_socket skt[0]; }; -struct pcmcia_state { - unsigned detect: 1, - ready: 1, - bvd1: 1, - bvd2: 1, - wrprot: 1, - vs_3v: 1, - vs_Xv: 1; -}; - -struct pcmcia_low_level { - struct module *owner; - - /* first socket in system */ - int first; - /* nr of sockets */ - int nr; - - int (*hw_init)(struct soc_pcmcia_socket *); - void (*hw_shutdown)(struct soc_pcmcia_socket *); - - void (*socket_state)(struct soc_pcmcia_socket *, struct pcmcia_state *); - int (*configure_socket)(struct soc_pcmcia_socket *, const socket_state_t *); - - /* - * Enable card status IRQs on (re-)initialisation. This can - * be called at initialisation, power management event, or - * pcmcia event. - */ - void (*socket_init)(struct soc_pcmcia_socket *); - - /* - * Disable card status IRQs and PCMCIA bus on suspend. - */ - void (*socket_suspend)(struct soc_pcmcia_socket *); - - /* - * Hardware specific timing routines. - * If provided, the get_timing routine overrides the SOC default. - */ - unsigned int (*get_timing)(struct soc_pcmcia_socket *, unsigned int, unsigned int); - int (*set_timing)(struct soc_pcmcia_socket *); - int (*show_timing)(struct soc_pcmcia_socket *, char *); - -#ifdef CONFIG_CPU_FREQ - /* - * CPUFREQ support. - */ - int (*frequency_change)(struct soc_pcmcia_socket *, unsigned long, struct cpufreq_freqs *); -#endif -}; - - struct soc_pcmcia_timing { unsigned short io; unsigned short mem; diff --git a/include/pcmcia/soc_common.h b/include/pcmcia/soc_common.h new file mode 100644 index 000000000000..26f1473a06c5 --- /dev/null +++ b/include/pcmcia/soc_common.h @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include + +struct module; +struct cpufreq_freqs; + +struct soc_pcmcia_regulator { + struct regulator *reg; + bool on; +}; + +struct pcmcia_state { + unsigned detect: 1, + ready: 1, + bvd1: 1, + bvd2: 1, + wrprot: 1, + vs_3v: 1, + vs_Xv: 1; +}; + +/* + * This structure encapsulates per-socket state which we might need to + * use when responding to a Card Services query of some kind. + */ +struct soc_pcmcia_socket { + struct pcmcia_socket socket; + + /* + * Info from low level handler + */ + unsigned int nr; + struct clk *clk; + + /* + * Core PCMCIA state + */ + const struct pcmcia_low_level *ops; + + unsigned int status; + socket_state_t cs_state; + + unsigned short spd_io[MAX_IO_WIN]; + unsigned short spd_mem[MAX_WIN]; + unsigned short spd_attr[MAX_WIN]; + + struct resource res_skt; + struct resource res_io; + struct resource res_mem; + struct resource res_attr; + void __iomem *virt_io; + + struct { + int gpio; + struct gpio_desc *desc; + unsigned int irq; + const char *name; + } stat[6]; +#define SOC_STAT_CD 0 /* Card detect */ +#define SOC_STAT_BVD1 1 /* BATDEAD / IOSTSCHG */ +#define SOC_STAT_BVD2 2 /* BATWARN / IOSPKR */ +#define SOC_STAT_RDY 3 /* Ready / Interrupt */ +#define SOC_STAT_VS1 4 /* Voltage sense 1 */ +#define SOC_STAT_VS2 5 /* Voltage sense 2 */ + + struct gpio_desc *gpio_reset; + struct gpio_desc *gpio_bus_enable; + struct soc_pcmcia_regulator vcc; + struct soc_pcmcia_regulator vpp; + + unsigned int irq_state; + +#ifdef CONFIG_CPU_FREQ + struct notifier_block cpufreq_nb; +#endif + struct timer_list poll_timer; + struct list_head node; + void *driver_data; +}; + + +struct pcmcia_low_level { + struct module *owner; + + /* first socket in system */ + int first; + /* nr of sockets */ + int nr; + + int (*hw_init)(struct soc_pcmcia_socket *); + void (*hw_shutdown)(struct soc_pcmcia_socket *); + + void (*socket_state)(struct soc_pcmcia_socket *, struct pcmcia_state *); + int (*configure_socket)(struct soc_pcmcia_socket *, const socket_state_t *); + + /* + * Enable card status IRQs on (re-)initialisation. This can + * be called at initialisation, power management event, or + * pcmcia event. + */ + void (*socket_init)(struct soc_pcmcia_socket *); + + /* + * Disable card status IRQs and PCMCIA bus on suspend. + */ + void (*socket_suspend)(struct soc_pcmcia_socket *); + + /* + * Hardware specific timing routines. + * If provided, the get_timing routine overrides the SOC default. + */ + unsigned int (*get_timing)(struct soc_pcmcia_socket *, unsigned int, unsigned int); + int (*set_timing)(struct soc_pcmcia_socket *); + int (*show_timing)(struct soc_pcmcia_socket *, char *); + +#ifdef CONFIG_CPU_FREQ + /* + * CPUFREQ support. + */ + int (*frequency_change)(struct soc_pcmcia_socket *, unsigned long, struct cpufreq_freqs *); +#endif +}; + + + From patchwork Fri Oct 18 15:41:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176850 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1029908ill; Fri, 18 Oct 2019 08:42:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6PVwij8HSSYEavHOoTx20qOMPWdDQ0+JCLDNOWU/UduTSEEe7/MRTWL3nABR6UalEq84v X-Received: by 2002:a50:bac2:: with SMTP id x60mr10244312ede.96.1571413359574; Fri, 18 Oct 2019 08:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413359; cv=none; d=google.com; s=arc-20160816; b=Bv4zVfoOsXav7jdp4xyw3/Pv7v8n9edAIJQUZMEjlCPsep8omPDeV18G4Fu2eKDuic WONMClLDEd4loemUzUM2l3EebPrT1nR39ejWCgTj7MyfZH8AQCYbaQ3APZa8fi+Nad4C mB9NgeG2yGlUhlmXdhPe4EVp/uAim7xhorfYSLuG1b4PJICFSX7QwaEVdFCAGuZvFN76 uyEbJxC//MGzDcdZ4V2KTuBvWWw2uZx0cANUMPg0SG8+Bkp0zdceAyiqKqJf8knbIxqn J95+cFyoUnFeRmNjPRvuXnH9/KDKmQa8QEr/zkcb7iclvJDkzFP9/T6EKn4ZnUYE98tW 56lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fOR4nKa8hcifKUGSnUJ4w3eYP5WQo0z+Gl4oOqzt/go=; b=lw6+YonPUlEwOT7D5c4BXUToL+5WwGnH2NFWWCmLGKBpH6CzKiyA5obWstPj9kdd92 pl3QPOX0it25si1G85B2u/jBHHjef4jHvhR0sK6zvyLBYSeuA/4Z1SzMIEORR0tv3DYU k1O5jCRPHrbirxeGIqxBrzMTRcGBKl+XoLNPYws6/vXO0uGK33h3+S1ukRdM28wF36fX kz8Zpo4MoPclRPz1wDeBIoUTrN4SLUWmF02iaN88mHtA3wImTt7TELLABVnaqAV1z68k nXlWyVeu3xnWUnW8Iimfc5GONJVUA35PfSHyop5T+oP/eTNlbApZfXSY0B0B9jA9lIEw jyAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si4295368ede.118.2019.10.18.08.42.39; Fri, 18 Oct 2019 08:42:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502097AbfJRPmi (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:38 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:51295 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2501966AbfJRPme (ORCPT ); Fri, 18 Oct 2019 11:42:34 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MNKqC-1ifkHC3J4k-00Orkl; Fri, 18 Oct 2019 17:42:24 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Jens Axboe , linux-ide@vger.kernel.org Subject: [PATCH 14/46] ARM: pxa: use pdev resource for palmld mmio Date: Fri, 18 Oct 2019 17:41:29 +0200 Message-Id: <20191018154201.1276638-14-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:9s9xjur6L83/idKD1YLwArjJyhyl8Cp7qlwCvaEgeO21rFy+Txo lkGteYOQn0MBqAMwkJi0uRdkZLsfImWHPdYLE7PLW21Sd3U+j5xmJVqizean3Yo6tGIyt4j b1FTAdx0jX4nBBwGdwJ6o8pC+wzWxEhYJyN0mswYrz7qjItCmmaKqVNf3OcjWcOw+Au25rz dMaGUYwa0lBQt8U9W94dw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:CGnzZHc3OD0=:1UpnXV4WJndTPk7c3U4mVT 58XASwopJp2Pwtju3qRPQf7vELH43tB/mnU3w9S1XGNK2fKElPNqbLdX9BoaoFCn2E43lKsGF 1k7jJBif/36MpjBUMzqOuHQkJSUwfurbA0nLOTsKz+dvxxR+s/E9dJrb2FN3K7J1oRAl0kEQQ UMjGv9xBTAxrHHVMoHxIGTqBx6VqHLXKW4ntZPFJl8OMnxHeJp5J7qXk0xS4UhrE1mOeoxUtR xmWF+qAp/KSrMZvQOYHiuRjNN7QgR6GVaCBLcVEN2wvHLml4jsRtWWJdcgvrwzioOGFjiwlh6 s+gEbfWpIHBId2plMIweDQmCWORT+CRxcWsEYEzcrXFDdyA092E6OqKzicnGMuw+gL2I6qrLI osG4LuHgVUkphSW7aOg4kBviIGnWDjQjzzU7njddgQ6SgzEJiDSt14MsT0q8bGY/RcMrPm8/+ HVDQwKwSmGR09sO96wMI5oKvzXwZeW1HFYATOlw9bbgTKpnYiQ2f79SbVO2YHcKjFulZsXCiI pFUxCUAJ1J40OGkqr01masMQecvHN+gbyt0L4r5M2KVdZ5Hcw52J9lFNGrKIkvImIaNIQL4ZJ lZCQBtZ1r3RcCRgxeJNWEOFkZbEfHV7beKkonkUlPpMbgur3MAu1PSMPDciZw8+4CCZoRU4Ll 4NZ/jDpVOVwFdDHEsY21mQW07Qhxy942y0cUYlEWYZnmVoYwKF/WtXdeX99tqzk2meV657IHA n6/zsOBjfI2E3hIN08dSwgB8KAS8R4OOti2DQcxhPCzraPjhD+zU6E6L4rpqqFZ0xfT+QBuUk XeACZjHjrhwQ+lau79HXI35qmO1otzkjAuHOFjjfMIHDYmjuBTkWdV+2NJEf5cR8G1OOTg1JR FDDTyCTRoc9JoCXNmHbw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The palmld header is almost unused in drivers, the only remaining thing now is the PATA device address, which should really be passed as a resource. Cc: Bartlomiej Zolnierkiewicz Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/palmld-pcmcia.c | 3 ++- arch/arm/mach-pxa/palmld.c | 12 +++++++++--- arch/arm/mach-pxa/{include/mach => }/palmld.h | 2 +- drivers/ata/pata_palmld.c | 3 +-- 4 files changed, 13 insertions(+), 7 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/palmld.h (98%) -- 2.20.0 Acked-by: Robert Jarzmik Acked-by: Bartlomiej Zolnierkiewicz diff --git a/arch/arm/mach-pxa/palmld-pcmcia.c b/arch/arm/mach-pxa/palmld-pcmcia.c index 07e0f7438db1..720294a50864 100644 --- a/arch/arm/mach-pxa/palmld-pcmcia.c +++ b/arch/arm/mach-pxa/palmld-pcmcia.c @@ -13,9 +13,10 @@ #include #include -#include #include +#include "palmld.h" + static struct gpio palmld_pcmcia_gpios[] = { { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, { GPIO_NR_PALMLD_PCMCIA_RESET, GPIOF_INIT_HIGH,"PCMCIA Reset" }, diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index d85146957004..d821606ce0b5 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c @@ -29,8 +29,8 @@ #include #include "pxa27x.h" +#include "palmld.h" #include -#include #include #include #include @@ -279,9 +279,15 @@ static inline void palmld_leds_init(void) {} * HDD ******************************************************************************/ #if defined(CONFIG_PATA_PALMLD) || defined(CONFIG_PATA_PALMLD_MODULE) +static struct resource palmld_ide_resources[] = { + DEFINE_RES_MEM(PALMLD_IDE_PHYS, 0x1000), +}; + static struct platform_device palmld_ide_device = { - .name = "pata_palmld", - .id = -1, + .name = "pata_palmld", + .id = -1, + .resource = palmld_ide_resources, + .num_resources = ARRAY_SIZE(palmld_ide_resources), }; static struct gpiod_lookup_table palmld_ide_gpio_table = { diff --git a/arch/arm/mach-pxa/include/mach/palmld.h b/arch/arm/mach-pxa/palmld.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmld.h rename to arch/arm/mach-pxa/palmld.h index 99a6d8b3a1e3..ee3bc15b71a2 100644 --- a/arch/arm/mach-pxa/include/mach/palmld.h +++ b/arch/arm/mach-pxa/palmld.h @@ -9,7 +9,7 @@ #ifndef _INCLUDE_PALMLD_H_ #define _INCLUDE_PALMLD_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/ata/pata_palmld.c b/drivers/ata/pata_palmld.c index 2448441571ed..400e65190904 100644 --- a/drivers/ata/pata_palmld.c +++ b/drivers/ata/pata_palmld.c @@ -25,7 +25,6 @@ #include #include -#include #define DRV_NAME "pata_palmld" @@ -63,7 +62,7 @@ static int palmld_pata_probe(struct platform_device *pdev) return -ENOMEM; /* remap drive's physical memory address */ - mem = devm_ioremap(dev, PALMLD_IDE_PHYS, 0x1000); + mem = devm_platform_ioremap_resource(pdev, 0); if (!mem) return -ENOMEM; From patchwork Fri Oct 18 15:41:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176851 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1029935ill; Fri, 18 Oct 2019 08:42:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzfKPuAO12uwfdJmR2u9Pcl9uZ7qqXts1rjbKaj1pWzOTbL67TfvCuDGVOT860xcauf7Cp X-Received: by 2002:a17:906:4d44:: with SMTP id b4mr9716025ejv.105.1571413361242; Fri, 18 Oct 2019 08:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413361; cv=none; d=google.com; s=arc-20160816; b=NrPlKnobDGxmRU5/m+gO1upPEbfoGDEg1Hgf1R/uFuzMAiFQhc8ApOl6rUZwQDhW5b EPMNgrooZmM38jtqooROfcp0wfsLsEKelX6kbXDs+DXZddr2Nea3xqzbkA0hYa4WtC0I uPlEaEZ/J9q/WwVGaVT1Hw9ZUUILrmPAhm80sVpweDontk29RJB0c/Q4UFTisnnju0rU 9zLYrKh2h5FHuQ0K+1zT21to6++ctXOvVM5FboCui/VWLqibRNgz6JNukBzQQbNb6WAA yplowYAb3OGBudqoTHc97Yzt2Isr95mX4RCW++NuOvMNfkz7ADyQ+wwWfx7FMwJqR1Bz 8xqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pv6afOtKSnXuSqcLkE5hN1zu7kIixl5cypAh6kADQRo=; b=FMHbDNJfJ3I9NDMIjoiNNaf63vwxhmLeRNCxc9XfaCKabWsfzO6cYFgMr/keum6qT/ NxeUIZkf9jNQ7hlEGXE0fQ5Y4olmnxtXBOXdLh4j22MpF8uvFXJkY07UELD6qYdNKBoe xOgt0WpfsuA7yvcJD8kdyXeHKQvpuUahumAWCkUShA/cUpI4d/XJNMG+bvR+0rfvEAAH yVqIF6ipMoiIXUBEsDkA3x9felO+fSSlrSyIL0AGMBD41cGEHc3LiC0ILxKB8ZPs0MJF cWoXp2F8dr1MNv5Wqg0W6T33+hdL40WyIwOgOwEVKk+Qz4EYdCUiHr78jzwSgjymwu3G hPcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si4295368ede.118.2019.10.18.08.42.41; Fri, 18 Oct 2019 08:42:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505171AbfJRPmj (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:39 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:36359 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405757AbfJRPmf (ORCPT ); Fri, 18 Oct 2019 11:42:35 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M9Fvl-1iRFA60KiV-006MSw; Fri, 18 Oct 2019 17:42:25 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann Subject: [PATCH 15/46] ARM: pxa: maybe fix gpio lookup tables Date: Fri, 18 Oct 2019 17:41:30 +0200 Message-Id: <20191018154201.1276638-15-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:syPUHdH7zx5d1jKKxubzoRF3w6dnwzW9ph10lyNvIkzlg2UPc+n WicQDwAvgeDChbQgeTjfHAnra993MATAZ6ChdvdsZxWuh4SdT4z1yIP3/xQoWlTkqTO/Wjz ptxp60wybFrjdmfE2DdySvomyYIvEQLExy/RoAD2dpMr1ikMxEwvPajQvY+penWKv3Uojkj fNFRTETTMlT7VvFn8VggA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:yWY/+VG4pjI=:DTl6Icej/SxGZGsMd8zgCF FWyMzXZMzJzFdyYEFXS0M5s8SRJkq5yZ3GvLFlskJQR69z/z77b0OCovzRWxYl6yiQIb1Qjx+ vfbzsQ+8ojNroHUob+NZupz/vXHsEe7cn5nAaFh5p7lLElLQ9nhdy+CZFu57bEQfgyp8YlwCp 67d/Ko59y5VCmou1dzKZsmcY2cLrnogZyOmnrqD4G1n0sJJBmD49l6YHmdKBmvskOHRbXCWhr Hmu1ajas2Ryo6teWSk3IUWsDQfZc9rWT/AtD5z2uNKjamqzJ4KGkXrQfJyHoaTrX+WlUdkmox PlDrWJemwJm//6GAe9e/Uq4O13E4Y61NuyT8r1p/PYgFduN5xSxIcOoA5z4R7D91otK4G0aai s4+ScCCx7ljRVe7fFgvzMtySpi5fC+pJ0kFGaJnXQTfWtdNXKdtsS5EphDA/hARlyD1WcPrS0 tVW4fB2Rk97Que2WscRL2XryPygX1T7LGkcYYcCc1/v77xuNoot8ZKqW3ORYuDCVbXFiF+hCX m09pPLXkweQ4ClYfHwWG8Ijoeg4qFIuHIApkG2N12MNYiFzB/P26iDrviX6Gw3eukfdW+62bt u8Ym1nC+Kcng8raLcZvnd/BJuEDLUoWg0jhgaDwlsjJ7kOAZL48iss5jQV0tcj3Lm0OX1w+Ji iOIGfrHQtDLk+YmIsj6Yp6qboepnpj+rTn783RbubP6SkOhMhW1BJZ7wXrXYJXOlhFN2JU6dh RS6OHRFfTCq4qYudlFHfUESZ6Ax1D2tFgRKSYLK76t05DbSCpyetzP5yay30HsL9AkvEDWc4R rNuU88SdEvcEDf80P3EcL9umi+tw42HLvqon8M8DirFGVFPo1Rb80oUrRo9imj0L464bB2lww wqkChN0tT5zrIBG2RxGw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >From inspection I found a couple of GPIO lookups that are listed with device "gpio-pxa", but actually have a number from a different gpio controller. Try to rectify that here, with a guess of what the actual device name is. Signed-off-by: Arnd Bergmann Acked-by: Robert Jarzmik Reviewed-by: Linus Walleij --- arch/arm/mach-pxa/cm-x300.c | 8 ++++---- arch/arm/mach-pxa/magician.c | 2 +- arch/arm/mach-pxa/tosa.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) -- 2.20.0 diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 6cdc440672a6..92fbe4cf71c7 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -357,13 +357,13 @@ static struct platform_device cm_x300_spi_gpio = { static struct gpiod_lookup_table cm_x300_spi_gpiod_table = { .dev_id = "spi_gpio", .table = { - GPIO_LOOKUP("gpio-pxa", GPIO_LCD_SCL, + GPIO_LOOKUP("pca9555.1", GPIO_LCD_SCL - GPIO_LCD_BASE, "sck", GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("gpio-pxa", GPIO_LCD_DIN, + GPIO_LOOKUP("pca9555.1", GPIO_LCD_DIN - GPIO_LCD_BASE, "mosi", GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("gpio-pxa", GPIO_LCD_DOUT, + GPIO_LOOKUP("pca9555.1", GPIO_LCD_DOUT - GPIO_LCD_BASE, "miso", GPIO_ACTIVE_HIGH), - GPIO_LOOKUP("gpio-pxa", GPIO_LCD_CS, + GPIO_LOOKUP("pca9555.1", GPIO_LCD_CS - GPIO_LCD_BASE, "cs", GPIO_ACTIVE_HIGH), { }, }, diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index e925f7a8d349..31037679bf24 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -675,7 +675,7 @@ static struct platform_device bq24022 = { static struct gpiod_lookup_table bq24022_gpiod_table = { .dev_id = "gpio-regulator", .table = { - GPIO_LOOKUP("gpio-pxa", EGPIO_MAGICIAN_BQ24022_ISET2, + GPIO_LOOKUP("htc-egpio-0", EGPIO_MAGICIAN_BQ24022_ISET2 - MAGICIAN_EGPIO_BASE, NULL, GPIO_ACTIVE_HIGH), GPIO_LOOKUP("gpio-pxa", GPIO30_MAGICIAN_BQ24022_nCHARGE_EN, "enable", GPIO_ACTIVE_LOW), diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 23da9568c520..264b5b6ed13b 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -295,9 +295,9 @@ static struct gpiod_lookup_table tosa_mci_gpio_table = { .table = { GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_nSD_DETECT, "cd", GPIO_ACTIVE_LOW), - GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_SD_WP, + GPIO_LOOKUP("sharp-scoop.0", TOSA_GPIO_SD_WP - TOSA_SCOOP_GPIO_BASE, "wp", GPIO_ACTIVE_LOW), - GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_PWR_ON, + GPIO_LOOKUP("sharp-scoop.0", TOSA_GPIO_PWR_ON - TOSA_SCOOP_GPIO_BASE, "power", GPIO_ACTIVE_HIGH), { }, }, From patchwork Fri Oct 18 15:41:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176886 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1032870ill; Fri, 18 Oct 2019 08:44:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFHhvQoRIXrqAR6nPrH15I82uEXHFiTIqb4k3j6qiAwQ9CpOT7WJ5O1Pxy6agLQZqJNAjP X-Received: by 2002:a17:906:7f03:: with SMTP id d3mr9517728ejr.209.1571413497304; Fri, 18 Oct 2019 08:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413497; cv=none; d=google.com; s=arc-20160816; b=NN8hLB/jZjBN8BHOV66q1yDhlGy9W7VKb9RGcvegUpbGg17ppUII6KkXJEkdH9z/bK 85IP7tlbIvZPpftEHtwtEiXH9GTLXKrpI+HHWj1gDq7VScW0mobmF7RvrcYEjimIGn6g gw5nPy2e8Y26IfsLIrTixr6SFuKO5lauqNd7K39RwI08LtsZy3swkb67RWeoKZO4RYNL FOMzhQ63US2K+3g/0wC/eOoku5DN0hsid1lWyNO9RKLJUE/gC+vO2hprI7uNclKD52JA t7X8iN5JY+UZ2FwbvP6yOp6keXsYQu3E8bJmui3VPkVqSAqniQeEiI18cUWewO5Hf+cy kdzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KhdmHtDo4DSyH79QM53y68u2+IzG0UXVvIESHQsMqq0=; b=Owj+pvoSHY4wEcrKuO2zYIWvTYGa+oJ3ZOEAiND4qBnyi+LzKOtF5GmexgJ3k1j9KI ud6IKl8kVBAm7eZ4lVDEzF1usU/GwHslB7YddQeshtQtGr56OT2LrQzmggV+UoGDmF7E EuGpXeCZ0BgnXgfMkbs7Dv6yASYbhux49kxu6twopSt3kJwirp6LidV6J1jz93m93m9T 1Qw0TDSKZ46TzVVKJYbTb806yHnAUzzp1pYkJTZ/vJStLDO/PPOa2YVxMScXWwHKQuyd NmZE2neSs4a+/A6uN100dYibrHqnCrcSHsFOUI83grHlzhj1TXSkp+Gp1iLXJCobsuyQ MULQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d25si3866915edq.65.2019.10.18.08.44.57; Fri, 18 Oct 2019 08:44:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505463AbfJRPok (ORCPT + 26 others); Fri, 18 Oct 2019 11:44:40 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:49151 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505174AbfJRPml (ORCPT ); Fri, 18 Oct 2019 11:42:41 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MG9Xu-1iFzgL1eRQ-00GVSz; Fri, 18 Oct 2019 17:42:25 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH 16/46] ARM: pxa: tosa: use gpio descriptor for audio Date: Fri, 18 Oct 2019 17:41:31 +0200 Message-Id: <20191018154201.1276638-16-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:E20XgLKSQLAmPv/Au++8EwmYOgk3y+XACbUkV3LAih2e2Yj07KM g05RSY7gyHzJgD4iIfT7YhtgXiu1Lr1vuBtrh6M2wc4pYSmoYCowFNc0qD0m8AOU38V+L2J 1uw4hDqzNqscLb3ouObtwnShsY39wQ2qTmK85xQMDWFl/iuUo8Unpvdft1lD9W1dGmdH1RY Tz3ENzPk5SnnU/9zsKF2A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:Sa9VA/rH7Rw=:tUTpmnZ1ACTEs7/I4CO+z/ JcGaLN/vw2kDyaS+WvNVr89diurJqlTwzePy8dNm1SH21cdmG1ncV7vX16jJLqZr/a1JfMqCm OqsU9LNZrNd2oE2cFaoz1wFzK9XosYLFmQ8sOpE0UTPjF+76H2d+8kzd9h9scBkf5p61N/Asx erZU7ZdoSEU+/JL8LflFBP4wChaLjJLp73Rff5I24hvqQC1sWHa6RgRX5xAOedrfHuW9yhasm tYPsiN+QsuXgWZIi+UgJOiHH8qvaSUDzhDP9qWh7kw+wm78B6QVz9ipH+h8k3dFnfaFYSrh+G FaPBTEyVa9Z+mvL+chhfa4/SzgaLx+XS+ZQhNxxAXg2r+B6xd18a4nFk4bux/Uhm0xqOXczJu EFrEkZNA2xFfvmNIGeuyYg/5UHlic66vyoLfnYwuP8f23wi/tTJCPMUEms43ggCrx3G6ON0wr b59aB8CvmuDTAF65622N2WD6oZqJBz9amgm0V5MuiT+MQPN9LYfqws5kx8tIx0E9IwyDJmXOZ Gj4ZVdA6lx2uQRTp2V9qqMo+vzaqqcABlgjOdS6aQqVEakqWN9xjexkFOYYFqbzgGkLOdsC80 zthA0EGldK9IKGoixKU1rXVAFU0dvxvbv6V4tWAGO20+o5Wt4NeSIieFFbDVX6PzLTiMzijWl GYOpBL4BzXt4Bdu8WeB4jMKiyQKWtjTmdzCBqLemKz+3mvnkC97/hscZhRcfj16DKW38TTEJz ClYctnIUkkXqWF3chUrPpZAiIyahgaR3QFnbNhUQeGw23H6n4QuaDx+Ff/jwsAyF2CjMBUGNI x+9DU9vHCheyMnAcWabolXltjGzjYlmTmj/ygdMt0uY3NWfscFit9ossaMY+rUMyTicgZs4P3 kidBS57Dl4kQ8A4of0KQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The audio driver should not use a hardwired gpio number from the header. Change it to use a lookup table. Cc: Mark Brown Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/tosa.c | 12 ++++++++++++ sound/soc/pxa/tosa.c | 16 +++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) -- 2.20.0 Acked-by: Mark Brown Acked-by: Robert Jarzmik diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 264b5b6ed13b..9a7f1e42adac 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -859,6 +859,17 @@ static struct platform_device wm9712_device = { .id = -1, }; +static struct gpiod_lookup_table tosa_audio_gpio_table = { + .dev_id = "tosa-audio", + .table = { + GPIO_LOOKUP("tc6393xb", + TOSA_GPIO_L_MUTE - TOSA_TC6393XB_GPIO_BASE, + "l-mute", GPIO_ACTIVE_HIGH), + { }, + }, +}; + + static struct platform_device tosa_audio_device = { .name = "tosa-audio", .id = -1, @@ -916,6 +927,7 @@ static void __init tosa_init(void) PMCR = 0x01; gpiod_add_lookup_table(&tosa_mci_gpio_table); + gpiod_add_lookup_table(&tosa_audio_gpio_table); pxa_set_mci_info(&tosa_mci_platform_data); pxa_set_ficp_info(&tosa_ficp_platform_data); pxa_set_i2c_info(NULL); diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index 81ee1bcf4c44..d671cf3d44ed 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c @@ -16,14 +16,13 @@ #include #include #include -#include +#include #include #include #include #include -#include #include #define TOSA_HP 0 @@ -35,6 +34,7 @@ static int tosa_jack_func; static int tosa_spk_func; +static struct gpio_desc *l_mute_gpio; static void tosa_ext_control(struct snd_soc_dapm_context *dapm) { @@ -128,7 +128,7 @@ static int tosa_set_spk(struct snd_kcontrol *kcontrol, static int tosa_hp_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { - gpio_set_value(TOSA_GPIO_L_MUTE, SND_SOC_DAPM_EVENT_ON(event) ? 1 : 0); + gpiod_set_value(l_mute_gpio, SND_SOC_DAPM_EVENT_ON(event) ? 1 : 0); return 0; } @@ -222,25 +222,23 @@ static int tosa_probe(struct platform_device *pdev) struct snd_soc_card *card = ⤩ int ret; - ret = gpio_request_one(TOSA_GPIO_L_MUTE, GPIOF_OUT_INIT_LOW, - "Headphone Jack"); + l_mute_gpio = devm_gpiod_get(&pdev->dev, "l-mute", GPIOD_OUT_LOW); + ret = PTR_ERR_OR_ZERO(l_mute_gpio); if (ret) return ret; card->dev = &pdev->dev; ret = devm_snd_soc_register_card(&pdev->dev, card); - if (ret) { + if (ret) dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); - gpio_free(TOSA_GPIO_L_MUTE); - } + return ret; } static int tosa_remove(struct platform_device *pdev) { - gpio_free(TOSA_GPIO_L_MUTE); return 0; } From patchwork Fri Oct 18 15:41:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176859 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1030597ill; Fri, 18 Oct 2019 08:43:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpPApVvL0nP73xedMkPBtHl0YqRPBBsnrt2yHWi/G83jl1ih+d70HhlFUVuL9atrXYfyD6 X-Received: by 2002:a05:6402:2025:: with SMTP id ay5mr10330379edb.93.1571413390448; Fri, 18 Oct 2019 08:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413390; cv=none; d=google.com; s=arc-20160816; b=I7POAar+zWV1Vqhz7AYNMeKK9S61WqchabX8XOkqEWBM8p/JTlDu2UYjJNECdxzOy2 H+n7Sr0b+zqGWPCUj3Y7W8LTe2KJIAySKFis4+TsGQ94y7wc+i5y0HHV3HranaRs4dY0 Dm9evD9TRJFdJ06oz0Rtk8S7t6KGu8KJLZLy3vWx2eF45yJjEE9R8zvse+e7pi0A24my 2xNQYjT3X32ok0iab8NtVsvw5Z2k0VuqfjC4NmTy4DZj5Kk58ebOItEeI1Ou716+SIWU c7mdq00paSaAasHLO8wqfHPWWGFESx4RkyKYsrBk4cps5UVYdq34VyIJxIs0wq+V+bMU g7og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=iXHXsuk8L55XBylBoCri75zxU6CZ6daSFp0kmrDMW+w=; b=x4SQXchqRsKI/8DITeVqsSrpSScN2woWCMkDjBojx1xfml95mRf8xwOfHaX6q+wzLH I42jBsr05cNd+mrHCdXRF79JUV/FI22F7SiTgmpC0EFoehIcdeBg7HwMzITBY1PO5bqv oMdIUKclkP5+q/zt8Cfe/5BUgd7iLHnujlh71zThcnrFidi5Lir9E/fAr1fy4pCofz3M P60QBF+2EtUHAa00CG1+ZVzopofkRQUNIRfadMRLLicxFIratLKEWSeYhpMmOlRzTWo9 +095FDl9Ts95H5TB3o94CoJKgmQJ5ll/W04/8o92ffeXI0QgCKKcCw5MVzgZBsuyeT/4 G3gA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b56si4139714edb.418.2019.10.18.08.43.10; Fri, 18 Oct 2019 08:43:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505272AbfJRPmy (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:54 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:35025 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505201AbfJRPmp (ORCPT ); Fri, 18 Oct 2019 11:42:45 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MEFrX-1iDXlf06Gj-00ABwm; Fri, 18 Oct 2019 17:42:26 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH 18/46] ARM: pxa: corgi: use gpio descriptors for audio Date: Fri, 18 Oct 2019 17:41:33 +0200 Message-Id: <20191018154201.1276638-18-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:TqURoHHVJJmB+BNcKhSOQIg0v6FOc3XqbZHPLBmLP4R4qV3sYnw Wj8jrIMhPIgJIiCbUcoB6dtFG7A6LCSnqqQyt8ataw+kTic0BPNHvJ+47PKruXnXFDSu85e +wOLnjABrp7TC9aqYKM1HcEW4uw9eFPgLPQr6fFAFymJdN2/X0iFDQk9+eSKJMk0BNbWhg5 gneq88ZVmC0Ae440lGuSQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:yDgI6IIkP4I=:Dwre/9Q/lAAK7XEGRGDeHA 5wQ6CrppVUlAv7ty6RB6U4TBJnmLvFvR8V84o1QCpxtBwBLLng+q13n+ZNnjV4WCmFLHnrhz2 aIVBdeoyRsygP0zDhjf/0ayvL08OsLQX18RtCKfPl9YjhrleOo+DWFSa4bMjhvsTwnzszgSIy QbbTnOTlZvYpclGokzepVa3WJyEt4I+hQzA6EI6fvFbwgyw1AYYoQI2g6bqsNMNvtJFRL6VLF x41JRYATNYsDilIRtAfCALbYPL9p66j2XjKWfqMlkOTIvq4bhHx1o8AqWJ3fmlbmf2SiAyqE9 gi/tgII5JKupWpyww8JQcXQcgdBz4juLPcLIgOd2bwaP6sx71tycLcYzzXxS3FazV76GNkLBc 8V+DfrFmAraFdB1459OpAKlw26XS1Nj5PTdZ4tUds0AYctoNL7aCS5UNj8tFOSdJsj3+lmYnr kAkpwMbVPbSrTn6M2XMutCbjjMqqyI9cZa/7PKWKUmhwUrmQedOE/SYeNnA5t8Yy/EN2Gtaz7 3/DLM1TUOoeCMxKepkGBkBUFX8MhDzq3KWZympkfVyz8TMkYCs/Dix/m/sWJ5DN8YFNnvtc+K 3AtZpCPdNx81OCQSF/Ru8V3f8gtL+Eo0qT2jHN1gyrJpFWABbAAluBrC+g+2s6etL9K9JJn4t UmG7zLDViZpWsc9RXv/ahVsfVvF7QGTpEGBowj6ZLtlWC2HaVEbxzCP/7/kXz5qtU978M9POI K4kcxA1iPGYq4NV/V90WmPpCWMSBF5BaO5zh3e5g/kc7dAmJytHL0xFbQOhsPIZkHYJTSZ/5y gofshTfkjZrwPiMBm9pptriZ7EWNbW6WHEy/semSfAUGW4GQqXsupl6K4v9x3c9b64c+2wyLr g9Ax+n5CcCDM0fOLODuA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The audio driver should not use a hardwired gpio number from the header. Change it to use a lookup table. Cc: Mark Brown Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann Acked-by: Mark Brown Acked-by: Robert Jarzmik --- arch/arm/mach-pxa/corgi.c | 22 ++++++++++- arch/arm/mach-pxa/{include/mach => }/corgi.h | 2 +- arch/arm/mach-pxa/corgi_pm.c | 2 +- sound/soc/pxa/corgi.c | 40 +++++++++++++------- 4 files changed, 50 insertions(+), 16 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/corgi.h (98%) -- 2.20.0 diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index e9743ebbee86..0ff8e8140513 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -49,7 +49,7 @@ #include #include #include "udc.h" -#include +#include "corgi.h" #include "sharpsl_pm.h" #include @@ -472,6 +472,25 @@ static struct platform_device corgiled_device = { }, }; +static struct gpiod_lookup_table corgi_audio_gpio_table = { + .dev_id = "corgi-audio", + .table = { + GPIO_LOOKUP("sharp-scoop", + CORGI_GPIO_MUTE_L - CORGI_SCOOP_GPIO_BASE, + "mute-l", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop", + CORGI_GPIO_MUTE_R - CORGI_SCOOP_GPIO_BASE, + "mute-r", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop", + CORGI_GPIO_APM_ON - CORGI_SCOOP_GPIO_BASE, + "apm-on", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop", + CORGI_GPIO_MIC_BIAS - CORGI_SCOOP_GPIO_BASE, + "mic-bias", GPIO_ACTIVE_HIGH), + { }, + }, +}; + /* * Corgi Audio */ @@ -740,6 +759,7 @@ static void __init corgi_init(void) pxa_set_udc_info(&udc_info); gpiod_add_lookup_table(&corgi_mci_gpio_table); + gpiod_add_lookup_table(&corgi_audio_gpio_table); pxa_set_mci_info(&corgi_mci_platform_data); pxa_set_ficp_info(&corgi_ficp_platform_data); pxa_set_i2c_info(NULL); diff --git a/arch/arm/mach-pxa/include/mach/corgi.h b/arch/arm/mach-pxa/corgi.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/corgi.h rename to arch/arm/mach-pxa/corgi.h index b565ca7b8cda..fe2fcf6532b9 100644 --- a/arch/arm/mach-pxa/include/mach/corgi.h +++ b/arch/arm/mach-pxa/corgi.h @@ -9,7 +9,7 @@ #ifndef __ASM_ARCH_CORGI_H #define __ASM_ARCH_CORGI_H 1 -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +#include /* PXA_NR_BUILTIN_GPIO */ /* * Corgi (Non Standard) GPIO Definitions diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c index ff1ac9bf37cb..c6ddfc737644 100644 --- a/arch/arm/mach-pxa/corgi_pm.c +++ b/arch/arm/mach-pxa/corgi_pm.c @@ -20,7 +20,7 @@ #include #include -#include +#include "corgi.h" #include #include "sharpsl_pm.h" diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 47647a1c3124..9db5a3d3606e 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c @@ -21,7 +21,6 @@ #include #include -#include #include #include "../codecs/wm8731.h" @@ -41,6 +40,8 @@ static int corgi_jack_func; static int corgi_spk_func; +struct gpio_desc *gpiod_mute_l, *gpiod_mute_r, *gpiod_apm_on, *gpiod_mic_bias; + static void corgi_ext_control(struct snd_soc_dapm_context *dapm) { snd_soc_dapm_mutex_lock(dapm); @@ -49,8 +50,8 @@ static void corgi_ext_control(struct snd_soc_dapm_context *dapm) switch (corgi_jack_func) { case CORGI_HP: /* set = unmute headphone */ - gpio_set_value(CORGI_GPIO_MUTE_L, 1); - gpio_set_value(CORGI_GPIO_MUTE_R, 1); + gpiod_set_value(gpiod_mute_l, 1); + gpiod_set_value(gpiod_mute_r, 1); snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack"); @@ -58,24 +59,24 @@ static void corgi_ext_control(struct snd_soc_dapm_context *dapm) break; case CORGI_MIC: /* reset = mute headphone */ - gpio_set_value(CORGI_GPIO_MUTE_L, 0); - gpio_set_value(CORGI_GPIO_MUTE_R, 0); + gpiod_set_value(gpiod_mute_l, 0); + gpiod_set_value(gpiod_mute_r, 0); snd_soc_dapm_enable_pin_unlocked(dapm, "Mic Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack"); break; case CORGI_LINE: - gpio_set_value(CORGI_GPIO_MUTE_L, 0); - gpio_set_value(CORGI_GPIO_MUTE_R, 0); + gpiod_set_value(gpiod_mute_l, 0); + gpiod_set_value(gpiod_mute_r, 0); snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack"); snd_soc_dapm_enable_pin_unlocked(dapm, "Line Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack"); break; case CORGI_HEADSET: - gpio_set_value(CORGI_GPIO_MUTE_L, 0); - gpio_set_value(CORGI_GPIO_MUTE_R, 1); + gpiod_set_value(gpiod_mute_l, 0); + gpiod_set_value(gpiod_mute_r, 1); snd_soc_dapm_enable_pin_unlocked(dapm, "Mic Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack"); @@ -108,8 +109,8 @@ static int corgi_startup(struct snd_pcm_substream *substream) static void corgi_shutdown(struct snd_pcm_substream *substream) { /* set = unmute headphone */ - gpio_set_value(CORGI_GPIO_MUTE_L, 1); - gpio_set_value(CORGI_GPIO_MUTE_R, 1); + gpiod_set_value(gpiod_mute_l, 1); + gpiod_set_value(gpiod_mute_r, 1); } static int corgi_hw_params(struct snd_pcm_substream *substream, @@ -199,14 +200,14 @@ static int corgi_set_spk(struct snd_kcontrol *kcontrol, static int corgi_amp_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { - gpio_set_value(CORGI_GPIO_APM_ON, SND_SOC_DAPM_EVENT_ON(event)); + gpiod_set_value(gpiod_apm_on, SND_SOC_DAPM_EVENT_ON(event)); return 0; } static int corgi_mic_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { - gpio_set_value(CORGI_GPIO_MIC_BIAS, SND_SOC_DAPM_EVENT_ON(event)); + gpiod_set_value(gpiod_mic_bias, SND_SOC_DAPM_EVENT_ON(event)); return 0; } @@ -293,6 +294,19 @@ static int corgi_probe(struct platform_device *pdev) card->dev = &pdev->dev; + gpiod_mute_l = devm_gpiod_get(&pdev->dev, "mute-l", GPIOD_OUT_HIGH); + if (IS_ERR(gpiod_mute_l)) + return PTR_ERR(gpiod_mute_l); + gpiod_mute_r = devm_gpiod_get(&pdev->dev, "mute-r", GPIOD_OUT_HIGH); + if (IS_ERR(gpiod_mute_r)) + return PTR_ERR(gpiod_mute_r); + gpiod_apm_on = devm_gpiod_get(&pdev->dev, "apm-on", GPIOD_OUT_LOW); + if (IS_ERR(gpiod_apm_on)) + return PTR_ERR(gpiod_apm_on); + gpiod_mic_bias = devm_gpiod_get(&pdev->dev, "mic-bias", GPIOD_OUT_LOW); + if (IS_ERR(gpiod_mic_bias)) + return PTR_ERR(gpiod_mic_bias); + ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", From patchwork Fri Oct 18 15:41:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176870 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1031582ill; Fri, 18 Oct 2019 08:43:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxhXUONpu/KBna2+FS5/R+pV0dcFmcnP/Gq4N+pAINzy2C3MNub1XTE9AOUdAVbc8OLZ6j X-Received: by 2002:a05:6402:19b4:: with SMTP id o20mr10192424edz.10.1571413433316; Fri, 18 Oct 2019 08:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413433; cv=none; d=google.com; s=arc-20160816; b=buwrkvhWefbGy0BFy0wA8fcWk9NnJpUjxbN6ZzAHc6Oxt4+9AYs4htQodi08uGjJLQ +oxXUxbJUBa5bBxp8BaZzdddG2ACIvERfP4X/71t/kRVP4hJfHkNK0hXgfreKs3RSAmA TeUVg/eddvu+glLnvrMmDZk6Ik2dmfJD1ERW9OS0ixhq+bJIcFkmeH/gc42W4mKIqbLc fy7DP3h3AjyFr/fg/ewjw2YEsjhX4Hq6VCkikmDnqaFyKCrB2np0Ud/RyiqqPg7l+SHz 2QNEI8rig6W4pNu+eup+amReqPSX6WQxeGrDyCyeIgaevYKYRx1Z91yOAZhHg+/qREuG DKpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MdfGI1YeHZEpLkQi7A70mQ/HmghBcndKoVoH0ozUKXY=; b=YrRrv9UWz9k7GvMfpKivL9SvZDQjgaVXWxml14MgEL3SYt+gdiAhRmPeM26a2vUYNW bAaj5m0E2ZrleeL4o3v1grQTPg/a8CYYt/c8hWha7FWccHg9lURPtH4Qhn8uo3iUcgNf IrEqsATHjz65F92ht3Z7FMOsHRfKtSEoFF/BG0oVq0GeFP38/EJ9rUg/tR9bHjGSGvli KdX5l17oOl+Zgn/V1ecKEBFNgvXq46/GYGH3i0SoVBLYtgRIEuoaZXSFR5M5lmihpuzx /ZBmVALOaelDWtxPaCUnfW2XrrDHke+naRFJUlm6UtJiQASFeXKm+0zDLX4kIhu90TWs cF+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si3323978ejr.368.2019.10.18.08.43.53; Fri, 18 Oct 2019 08:43:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633957AbfJRPnu (ORCPT + 26 others); Fri, 18 Oct 2019 11:43:50 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:55125 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505207AbfJRPmp (ORCPT ); Fri, 18 Oct 2019 11:42:45 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1McpS0-1hmhsG1gOI-00ZwWl; Fri, 18 Oct 2019 17:42:26 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Philipp Zabel , Paul Parsons , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH 19/46] ARM: pxa: hx4700: use gpio descriptors for audio Date: Fri, 18 Oct 2019 17:41:34 +0200 Message-Id: <20191018154201.1276638-19-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:VTDetqiA3IUPd37iiTjF8wmf8is9z0ii2hZFyGnfpBo7v9YzRzf eLPjN/VpyDbNNgQqFV9CrvQZZGL4LvF9qcdU1Wow93cSHhGzpdK2nq9u5Wx/PYPamq+3re6 Sk/nIeH15eZgiayt6b8hOpI8KxPD9zRBZ9hEYEH+Pnp6QXXjHK5Q0mab6YaTZX96iJ0we8Q z9m8F5M9ZSmiBlVV9yRSg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:Z5MPd9t3zuc=:f31rOBD3gYLsiOgUZCPLvb K/Wd1JvNV7F6gIvfl3p6iza//HPWorhTW38CfK+6SD/pXEIcjcuo8qh7NrKL//HaIuM2gm2qR n6KBMgZZ4gIQwhIeexa569uM8xBZIpXoPd5czCtWdFgb5jax+Jq+D6dvPUTUzXXfNETAYw+/R 8DM9MHZFBhn2V8HoEk1okYWzovOFgYq8Ej/sALgYoaHYw2cKJWPkboR3eieBuXUXKHkWoHxr7 9kNcaaaUDCiIuN1wtSTf/6hLoNwmqohiHuWcRulQG+mM3AuTdJQJE4FR886KE1MJq9CteBU9G iHYZuBp19msfHtU6hsmpOBWo86zga2Z8W1cIN04vewk3IvdMJEoefkwFTfMyhB8sfaLSKFxn2 L1QhyoN0sr1Or430sUqOiyHLUAqNFq2BeGa7tTfzwflAGHiSkmthybx3qJSL9O8xkbtlA///T 48YpjyVOYwOAB3bUSSpZO7hELaEMOz77+htSfhnJqUfCwz+119BJs6AIOjjqGooDKwjNnXGoU JWct38hOLypaQ1ZGwNhe1jFW0/sAGoZQSfS+5dE0kBASWFMqcJj4G4TDb6/m5WTu6R1IdMEBk 9JhqiaK6b6cdNsnRXh9t1+oRdbADOHwgtNtvwrEBxvmYY93WuFFD6qnBZjBJNRz5P9dnEEAUb jaVTvl1DLADz26gL1VgGIvr4pFZjiA++Dz6/6DxjEW1NRakOZElbomRh0z8n2pphk/x9YzkXh KC/0sM/qf2pUjNc9Tcs/8s9vj0SGEAyj9IbyEXCl/k80SNVXG4nOcG6zJ4sSa4UjuuUYel277 q2H2zM4VdnjppDQGBoVCF2kseF2BCbxh9dB0SZMRZTfz/4NJPKyivdMwg6BLXj07q/21+BlqZ SsdEOLWB8auzGCvIdxew== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The audio driver should not use a hardwired gpio number from the header. Change it to use a lookup table. Cc: Philipp Zabel Cc: Paul Parsons Cc: Mark Brown Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/hx4700-pcmcia.c | 2 +- arch/arm/mach-pxa/hx4700.c | 16 ++++++++- arch/arm/mach-pxa/{include/mach => }/hx4700.h | 2 +- sound/soc/pxa/hx4700.c | 34 ++++++++----------- 4 files changed, 31 insertions(+), 23 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/hx4700.h (99%) -- 2.20.0 Acked-by: Mark Brown Acked-by: Robert Jarzmik diff --git a/arch/arm/mach-pxa/hx4700-pcmcia.c b/arch/arm/mach-pxa/hx4700-pcmcia.c index e8acbfc9ef6c..e2331dfe427d 100644 --- a/arch/arm/mach-pxa/hx4700-pcmcia.c +++ b/arch/arm/mach-pxa/hx4700-pcmcia.c @@ -10,7 +10,7 @@ #include #include -#include +#include "hx4700.h" #include diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index b3dcbe291e13..84383d14bf64 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -42,7 +42,7 @@ #include "pxa27x.h" #include "addr-map.h" -#include +#include "hx4700.h" #include #include @@ -823,6 +823,19 @@ static struct i2c_board_info i2c_board_info[] __initdata = { }, }; +static struct gpiod_lookup_table hx4700_audio_gpio_table = { + .dev_id = "hx4700-audio", + .table = { + GPIO_LOOKUP("gpio-pxa", GPIO75_HX4700_EARPHONE_nDET, + "earphone-ndet", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio-pxa", GPIO92_HX4700_HP_DRIVER, + "hp-driver", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio-pxa", GPIO107_HX4700_SPK_nSD, + "spk-nsd", GPIO_ACTIVE_HIGH), + { }, + }, +}; + static struct platform_device audio = { .name = "hx4700-audio", .id = -1, @@ -883,6 +896,7 @@ static void __init hx4700_init(void) pxa_set_stuart_info(NULL); gpiod_add_lookup_table(&bq24022_gpiod_table); + gpiod_add_lookup_table(&hx4700_audio_gpio_table); platform_add_devices(devices, ARRAY_SIZE(devices)); pwm_add_table(hx4700_pwm_lookup, ARRAY_SIZE(hx4700_pwm_lookup)); diff --git a/arch/arm/mach-pxa/include/mach/hx4700.h b/arch/arm/mach-pxa/hx4700.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/hx4700.h rename to arch/arm/mach-pxa/hx4700.h index 0c30e6d9c660..ce2db33989e1 100644 --- a/arch/arm/mach-pxa/include/mach/hx4700.h +++ b/arch/arm/mach-pxa/hx4700.h @@ -10,7 +10,7 @@ #include #include -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +#include /* PXA_NR_BUILTIN_GPIO */ #define HX4700_ASIC3_GPIO_BASE PXA_NR_BUILTIN_GPIO #define HX4700_EGPIO_BASE (HX4700_ASIC3_GPIO_BASE + ASIC3_NUM_GPIOS) diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c index 0139343dbcce..2fae601f0844 100644 --- a/sound/soc/pxa/hx4700.c +++ b/sound/soc/pxa/hx4700.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include @@ -18,10 +18,10 @@ #include #include -#include #include #include "pxa2xx-i2s.h" +static struct gpio_desc *gpiod_hp_driver, *gpiod_spk_nsd; static struct snd_soc_jack hs_jack; /* Headphones jack detection DAPM pin */ @@ -40,9 +40,8 @@ static struct snd_soc_jack_pin hs_jack_pin[] = { /* Headphones jack detection GPIO */ static struct snd_soc_jack_gpio hs_jack_gpio = { - .gpio = GPIO75_HX4700_EARPHONE_nDET, .invert = true, - .name = "hp-gpio", + .name = "earphone-ndet", .report = SND_JACK_HEADPHONE, .debounce_time = 200, }; @@ -81,14 +80,14 @@ static const struct snd_soc_ops hx4700_ops = { static int hx4700_spk_power(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { - gpio_set_value(GPIO107_HX4700_SPK_nSD, !!SND_SOC_DAPM_EVENT_ON(event)); + gpiod_set_value(gpiod_spk_nsd, !!SND_SOC_DAPM_EVENT_ON(event)); return 0; } static int hx4700_hp_power(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { - gpio_set_value(GPIO92_HX4700_HP_DRIVER, !!SND_SOC_DAPM_EVENT_ON(event)); + gpiod_set_value(gpiod_hp_driver, !!SND_SOC_DAPM_EVENT_ON(event)); return 0; } @@ -162,11 +161,6 @@ static struct snd_soc_card snd_soc_card_hx4700 = { .fully_routed = true, }; -static struct gpio hx4700_audio_gpios[] = { - { GPIO107_HX4700_SPK_nSD, GPIOF_OUT_INIT_HIGH, "SPK_POWER" }, - { GPIO92_HX4700_HP_DRIVER, GPIOF_OUT_INIT_LOW, "EP_POWER" }, -}; - static int hx4700_audio_probe(struct platform_device *pdev) { int ret; @@ -174,26 +168,26 @@ static int hx4700_audio_probe(struct platform_device *pdev) if (!machine_is_h4700()) return -ENODEV; - ret = gpio_request_array(hx4700_audio_gpios, - ARRAY_SIZE(hx4700_audio_gpios)); + gpiod_hp_driver = devm_gpiod_get(&pdev->dev, "hp-driver", GPIOD_OUT_HIGH); + ret = PTR_ERR_OR_ZERO(gpiod_hp_driver); + if (ret) + return ret; + gpiod_spk_nsd = devm_gpiod_get(&pdev->dev, "spk-nsd", GPIOD_OUT_HIGH); + ret = PTR_ERR_OR_ZERO(gpiod_spk_nsd); if (ret) return ret; + hs_jack_gpio.gpiod_dev = &pdev->dev; snd_soc_card_hx4700.dev = &pdev->dev; ret = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_hx4700); - if (ret) - gpio_free_array(hx4700_audio_gpios, - ARRAY_SIZE(hx4700_audio_gpios)); return ret; } static int hx4700_audio_remove(struct platform_device *pdev) { - gpio_set_value(GPIO92_HX4700_HP_DRIVER, 0); - gpio_set_value(GPIO107_HX4700_SPK_nSD, 0); - - gpio_free_array(hx4700_audio_gpios, ARRAY_SIZE(hx4700_audio_gpios)); + gpiod_set_value(gpiod_hp_driver, 0); + gpiod_set_value(gpiod_spk_nsd, 0); return 0; } From patchwork Fri Oct 18 15:41:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176889 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1033388ill; Fri, 18 Oct 2019 08:45:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmJVDrOXHfO0NQsotNOwMtsYnrlNU8NoVSTHuCqugL5tjpRsZuXMBSyWJ1R9IKYh1390nB X-Received: by 2002:a17:906:68f:: with SMTP id u15mr9260114ejb.306.1571413520597; Fri, 18 Oct 2019 08:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413520; cv=none; d=google.com; s=arc-20160816; b=r73zCOYTIleEMOlUnakEpyCdtiTOB78ykxTUNawTamkG+02nZNeE3jOcwsziuYvC4I dBbZbQ6O5qojVyp1MQa7lcHXfH9aiGgmyK5cvcVOE8Rk0yDSdAdFJQ1DJohYk9AC6P+R BOp7Im6d/qZud8h+Howc5NfZBRE9ah9Fl0rKVahtuMoTIGAO1Mfe04rOcYFJb47VHVtW iKJlZpkp/YXE/kxKgYxbMUCVuyyoiMwRD3Deu/IM17KY22Ngp79MvF1eQSYiqmc+AHR7 cbne4iz3H9pLZj71ZQa2zhHq5Clb1b9A7PPTdmDpkG9biQ0Dntvjj0P1DxKj9ZFfg4Jr mSwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=lU8gP7zL1vWEKYrGLFrmj2JmOCt0jK0UFNwkRktrqoE=; b=ilFLYXcg5kW2TYPeBkOuvCS/ahCHp5tGIQlDp6Rj5cWb3sJk5BkI5jSvrFAUocPg7I e29NMTgAcx7Jy0pMHArKuuMVL1zUaMFTJpw5vZk/m9kubWgzqVnclZawpA5rj3WLmQ7r tvw2FSkQ2wTAdY4k3xdOnae1l9D/yhDz/mEKg7BWFYj5+U6Ppjghct9zBfrtye0EUDz3 TMoId+VMKou/YJkbYDgTj1sBRJR6P+jsWQpLFBplXqIW9jD5GxX2TDRpFGoIb0S9sznN maxW5SuUJBhMNGDWpNUZxz7UyLlOlBSRPMNwze9JiFyspoSCLO/jtdYfUca22OpEetd5 EXzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si3991186eda.411.2019.10.18.08.45.20; Fri, 18 Oct 2019 08:45:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505514AbfJRPpQ (ORCPT + 26 others); Fri, 18 Oct 2019 11:45:16 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:36209 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502049AbfJRPmj (ORCPT ); Fri, 18 Oct 2019 11:42:39 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mw9Hm-1i4mQQ3FRM-00s9dJ; Fri, 18 Oct 2019 17:42:26 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org Subject: [PATCH 20/46] ARM: pxa: lubbock: pass udc irqs as resource Date: Fri, 18 Oct 2019 17:41:35 +0200 Message-Id: <20191018154201.1276638-20-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:nTJNH1PQzy8cjMMin7LOinomkqs0tSjkKrVT+kBFs4X3KlxxjXo dO6+aTpTiKZtK8QpEPweKazqSMi5+LBh8d25s0ioorZsFJb/eln2YpAq4JMhCuYX21uFI5r 7heIyxwKt5SHkA1O39LkzlW18z0/IxVs2ndKvJ2fTjJRQhiXeLcJWw79XcQu7cAP/hdX5bf t3Rc98BI5rEp2PEidC66w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:QuvpkRYK1V8=:PClHp9hqTY7U0i9I/VNCU5 683MANrigxXg9+rxrH9CRmdB8oFbOzHw3w1+HaOXloRGesp7YPDLJ+RG8gXuJA2/mih8e1DFQ Bs1Ua6tDAfbCOnqrtevCxFrcTfEP6w/XzyleuQDJ3tep7GYIKfIwRAL6pxo0kG0WlToxCXBMi Hpo1MZScQpdGJh9Z6upsJqtDHHuTLOoP6EzgLbvrYvvA+GIGj+sHv5caiTp9wS2IzWPe7OWBs dI8FR3g2T02YhTdERnH6OFzYsuFiFggF0M/CojavsILk+IsAbxcqRu/wH2gmUipBbnglGvLJR En1I05CplZg9zj8FueyPGhRRfpNOkqGiTwAhQKLglmhigKAuJW5NuIWu6yDA9KlP87NXldTTt 6DndgPN4J4s62xmmI/Qd7ANmnaPaq+a/BGfZclRpeUYQVPIk7iS2GNiWjUO4uykVQFJ3wOtFZ jEjwO1D+ujSMv5MIVYpjVSJ6+uC/Q41X5vY0xeACYYV4grZEF1viS/yMAKcTH4kx2d652HQ9T nD11IL/RA6DmIUn90mboBliM4C0M8mev9rctM7dUV3WRDFJ3XW/KojWx6Enb104zoeFtYOqEV nZQKK2NN13EP8pLQSuBuEW2QPFnAeiZbWMOfNuxf9KdnGwh/vb3JowwIhfS/WJk7Wrd9H13LS Yk/cF9/CbytyuxCaq/eQHS+En7RXOveDRCwjQCvnSvlBKZxUYC01CximEBYgHEqw6NaRtpG7m TLxF5zJeKwi1lBvau3glAcBzfNT6a5xqWLLLP+HP851pHHGn96JNR5oGt8Bn1O4++fnKCoJNV CQq9oL6tASvoeJZFt7LttVWibzZzHbLgSw4THK3XdpxqMOrbj5JP/qka0AOrtTmfUJVhpKa4W dr7PXeyGxe8SExkXZmOQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Lubbock is the only machine that has three IRQs for the UDC. These are currently hardcoded in the driver based on a machine header file. Change this to use platform device resources as we use for the generic IRQ anyway. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Arnd Bergmann Acked-by: Robert Jarzmik --- arch/arm/mach-pxa/lubbock.c | 12 +++++- .../arm/mach-pxa/{include/mach => }/lubbock.h | 2 - drivers/usb/gadget/udc/pxa25x_udc.c | 37 ++++++++++--------- drivers/usb/gadget/udc/pxa25x_udc.h | 7 +--- 4 files changed, 32 insertions(+), 26 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/lubbock.h (97%) -- 2.20.0 diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 098605c8eeed..187d9d8893d7 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c @@ -46,7 +46,7 @@ #include "pxa25x.h" #include -#include +#include "lubbock.h" #include "udc.h" #include #include @@ -131,6 +131,13 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = { // no D+ pullup; lubbock can't connect/disconnect in software }; +static struct resource lubbock_udc_resources[] = { + DEFINE_RES_MEM(0x40600000, 0x10000), + DEFINE_RES_IRQ(IRQ_USB), + DEFINE_RES_IRQ(LUBBOCK_USB_IRQ), + DEFINE_RES_IRQ(LUBBOCK_USB_DISC_IRQ), +}; + /* GPIOs for SA1111 PCMCIA */ static struct gpiod_lookup_table sa1111_pcmcia_gpio_table = { .dev_id = "1800", @@ -495,6 +502,9 @@ static void __init lubbock_init(void) lubbock_init_pcmcia(); clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); + /* lubbock has two extra IRQs */ + pxa25x_device_udc.resource = lubbock_udc_resources; + pxa25x_device_udc.num_resources = ARRAY_SIZE(lubbock_udc_resources); pxa_set_udc_info(&udc_info); pxa_set_fb_info(NULL, &sharp_lm8v31); pxa_set_mci_info(&lubbock_mci_platform_data); diff --git a/arch/arm/mach-pxa/include/mach/lubbock.h b/arch/arm/mach-pxa/lubbock.h similarity index 97% rename from arch/arm/mach-pxa/include/mach/lubbock.h rename to arch/arm/mach-pxa/lubbock.h index a3af4a2f9446..8e3ff7d57121 100644 --- a/arch/arm/mach-pxa/include/mach/lubbock.h +++ b/arch/arm/mach-pxa/lubbock.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * arch/arm/mach-pxa/include/mach/lubbock.h - * * Author: Nicolas Pitre * Created: Jun 15, 2001 * Copyright: MontaVista Software Inc. diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index d4be53559f2e..ed7ae48b7db2 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c @@ -44,10 +44,6 @@ #include #include -#ifdef CONFIG_ARCH_LUBBOCK -#include -#endif - #define UDCCR 0x0000 /* UDC Control Register */ #define UDC_RES1 0x0004 /* UDC Undocumented - Reserved1 */ #define UDC_RES2 0x0008 /* UDC Undocumented - Reserved2 */ @@ -1575,18 +1571,15 @@ lubbock_vbus_irq(int irq, void *_dev) int vbus; dev->stats.irqs++; - switch (irq) { - case LUBBOCK_USB_IRQ: + if (irq == dev->usb_irq) { vbus = 1; - disable_irq(LUBBOCK_USB_IRQ); - enable_irq(LUBBOCK_USB_DISC_IRQ); - break; - case LUBBOCK_USB_DISC_IRQ: + disable_irq(dev->usb_irq); + enable_irq(dev->usb_disc_irq); + } else if (irq == dev->usb_disc_irq) { vbus = 0; - disable_irq(LUBBOCK_USB_DISC_IRQ); - enable_irq(LUBBOCK_USB_IRQ); - break; - default: + disable_irq(dev->usb_disc_irq); + enable_irq(dev->usb_irq); + } else { return IRQ_NONE; } @@ -2421,20 +2414,28 @@ static int pxa25x_udc_probe(struct platform_device *pdev) #ifdef CONFIG_ARCH_LUBBOCK if (machine_is_lubbock()) { - retval = devm_request_irq(&pdev->dev, LUBBOCK_USB_DISC_IRQ, + dev->usb_irq = platform_get_irq(pdev, 1); + if (dev->usb_irq < 0) + return dev->usb_irq; + + dev->usb_disc_irq = platform_get_irq(pdev, 2); + if (dev->usb_disc_irq < 0) + return dev->usb_disc_irq; + + retval = devm_request_irq(&pdev->dev, dev->usb_disc_irq, lubbock_vbus_irq, 0, driver_name, dev); if (retval != 0) { pr_err("%s: can't get irq %i, err %d\n", - driver_name, LUBBOCK_USB_DISC_IRQ, retval); + driver_name, dev->usb_disc_irq, retval); goto err; } - retval = devm_request_irq(&pdev->dev, LUBBOCK_USB_IRQ, + retval = devm_request_irq(&pdev->dev, dev->usb_irq, lubbock_vbus_irq, 0, driver_name, dev); if (retval != 0) { pr_err("%s: can't get irq %i, err %d\n", - driver_name, LUBBOCK_USB_IRQ, retval); + driver_name, dev->usb_irq, retval); goto err; } } else diff --git a/drivers/usb/gadget/udc/pxa25x_udc.h b/drivers/usb/gadget/udc/pxa25x_udc.h index ccc6b921f067..c574fb602741 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.h +++ b/drivers/usb/gadget/udc/pxa25x_udc.h @@ -121,16 +121,13 @@ struct pxa25x_udc { struct dentry *debugfs_udc; #endif void __iomem *regs; + int usb_irq; + int usb_disc_irq; }; #define to_pxa25x(g) (container_of((g), struct pxa25x_udc, gadget)) /*-------------------------------------------------------------------------*/ -#ifdef CONFIG_ARCH_LUBBOCK -#include -/* lubbock can also report usb connect/disconnect irqs */ -#endif - static struct pxa25x_udc *the_controller; /*-------------------------------------------------------------------------*/ From patchwork Fri Oct 18 15:41:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176863 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1031065ill; Fri, 18 Oct 2019 08:43:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAU8neQYkngWgf3dt5+MesARPYFtBYN1aCMtQ+Q2O0icTYb4i3Le/nmZ7o9+etxNl7US6M X-Received: by 2002:a05:6402:1514:: with SMTP id f20mr10425076edw.35.1571413408137; Fri, 18 Oct 2019 08:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413408; cv=none; d=google.com; s=arc-20160816; b=MvVHr4uwNZvVxhxyzADLf5uMrJKYkQWnbLxtZUk1IxiRIVPip0IdmvQYq/aYa9kqBT unUa9It1xE0chE9Engmend+mbO8y2KcT/EdwzzPpJasd1df9Dvvy4n6viO10JRtDEBBu lXsnG/OaDNR4l6fwv3sPukSH91yVkcScR/O8E7N+QLZj8MOT1c5JX+kSSH2IXllQGLbA vmX/0mhHddh1U2Xv7YJBJ+I3G8d1EgTzXSkVDtxNyZq90lgNF6NacDDUhkHzlHYzSEaZ FI/sXkqdZk4bwhhvYwZlSr6K0Ebfq9PJuu/HPOGaLntWjnwhRFnxdS0/OuOkm8erP0YC H+xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UgikP/FgtJKQmirt+f2Th2onclSnYjMgbbYHDh3FkNs=; b=DTwhdVAjn3N+xhidErAo9a4RpeivxC5EHt2fpyT36QG73sKphHJDpQPfnbe4mmR+cI 23lajUBTeTdmuF5RIWbGpIC9Dhuo1C8OZPahOt7X+icDaJtuzkA3zHHQkFmpNAu56CVz IOehLe5dkj3nppDu68+Wia+HexrQM3C/TUwd5R2YJ+EL0ryj8xwcnyTfrF7NaDJRVTLG nrOHUOdo8x4xMC+Vp1eXGX8PzTfckhsfW6uLVESYiJ3WSGkwxe3R8UTVfWm22tPoED6/ LigOiOExadocoQ28EtBu/xe4LWtQ5W+WqtbmWzakn6ENnEE0YUUO1N5BgGnuTSw0OQz1 +59w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si3897729edu.4.2019.10.18.08.43.27; Fri, 18 Oct 2019 08:43:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505249AbfJRPmw (ORCPT + 26 others); Fri, 18 Oct 2019 11:42:52 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:50619 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505191AbfJRPmn (ORCPT ); Fri, 18 Oct 2019 11:42:43 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MqrwN-1hhUo60Vc1-00moY8; Fri, 18 Oct 2019 17:42:27 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH 21/46] ARM: pxa: spitz: use gpio descriptors for audio Date: Fri, 18 Oct 2019 17:41:36 +0200 Message-Id: <20191018154201.1276638-21-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:EnGATBO6UcVguXcv7G62u/so/z4MGLoOyIeCs3iHNegQs2eAeZx RXCX3mThC+ltOlQdPgJxtQZMZlOJ3twIf0mEeLe18rdoMMe6IE0UavPRiwZY+GxnbCoIXXx siq75br/ck5gUvdB2C3VR34VF3oWZTLCtTdwjYxeT5yXVF7pAztV6fyrPa/tQoSOff6iOPp zo94i1VPUXq+5/kWovNeA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:gb1LxFRHfzU=:NfvjD9Kuk7/AeZGNDEvdV5 /bA7c+abFvFFLaLKBvWWnHjzupokHiHg+jaqNzpFE2WYjHrtVuC4gMgvdZO4y3S34PNXdWjfM wqnMk/b2q75h1WdC6/kWPHOhbZNQr0ANRen9w1R70PqjvOCI7XcpjgRHimD2CzXB7AzVFcdoZ pPtTdkbQYvTSLxw8BYBW0i4v7yZHl5P59PDCdn2AtdJWVUfaRRmTs0dagR3/WQ/DODNBZxfM/ p6kbEQ8tNW7bhHzZBXJ7axwTspl8UXp6zg1Tk/fAh2x4rG+pOOHq6RoHMTD6t9HaP/rgv6gXf 5OFYhi91hf2ie0nje0StPKzkgLRKO7gUty9VBnyVCtI/6Rj7xcB5jzN/gsvV11G6+6e+y2GUz 7t26S42/ZX7OgdCDpAheaGua3bETTjvsPIBIfhetggs3Epj3Z6NTVX6cL+4Ivr7+4nhWY/qXI AYth/l5P6vp8KCf77uHQBogHOKmwJDXErHvdIUq3X5U+pIz/ktxdh6pN8SmVbA8YD+Hkq3anT GzbxCqdRH8nJfiftqSrar5m9Q969UJl8/Ge1ByvLjkN5fcWhnE6ZjK9jo8xRdqz9gKC7o+q7+ x8oU/4DNj52NVSPjh2Qb3PHMOfV6ZX1Ev7+bPWibNMlKkVqjGET3b/6QnaJ3BcQ/22q/YH8FU 3/qDrnVldAV+jR6qk6Eo+h6TluH8p89dkfB13mGUNThpGCPiz0AJorbMciyZ8PuLkix1Qp9rC NMH2LjHPDg0qwgyC/LCkvS5bRUiNT7TFDxcv3qFg7v6CS4ZFPNRsGFiwuxFBqpzn7Mmh3gUzY +GAC7QacilOEXNX3IXRGa7guukryclQBQCGzVNLeOc5B1pqXFRg8qVMAZnvmsSPIWlsHgaqzE r39gMLYEcFN91mxgZCVw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The audio driver should not use a hardwired gpio number from the header. Change it to use a lookup table. Cc: Mark Brown Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann Acked-by: Mark Brown --- arch/arm/mach-pxa/spitz.c | 33 ++++++++++- arch/arm/mach-pxa/{include/mach => }/spitz.h | 2 +- arch/arm/mach-pxa/spitz_pm.c | 2 +- sound/soc/pxa/spitz.c | 58 ++++++++------------ 4 files changed, 57 insertions(+), 38 deletions(-) rename arch/arm/mach-pxa/{include/mach => }/spitz.h (99%) -- 2.20.0 diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index a4fdc399d152..6028fd83c44d 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include "spitz.h" #include "sharpsl_pm.h" #include @@ -948,11 +948,42 @@ static void __init spitz_i2c_init(void) static inline void spitz_i2c_init(void) {} #endif +static struct gpiod_lookup_table spitz_audio_gpio_table = { + .dev_id = "spitz-audio", + .table = { + GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE, + "mute-l", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE, + "mute-r", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.1", SPITZ_GPIO_MIC_BIAS - SPITZ_SCP2_GPIO_BASE, + "mic", GPIO_ACTIVE_HIGH), + { }, + }, +}; + +static struct gpiod_lookup_table akita_audio_gpio_table = { + .dev_id = "spitz-audio", + .table = { + GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE, + "mute-l", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE, + "mute-r", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_MIC_BIAS - AKITA_IOEXP_GPIO_BASE, + "mic", GPIO_ACTIVE_HIGH), + { }, + }, +}; + /****************************************************************************** * Audio devices ******************************************************************************/ static inline void spitz_audio_init(void) { + if (machine_is_akita()) + gpiod_add_lookup_table(&akita_audio_gpio_table); + else + gpiod_add_lookup_table(&spitz_audio_gpio_table); + platform_device_register_simple("spitz-audio", -1, NULL, 0); } diff --git a/arch/arm/mach-pxa/include/mach/spitz.h b/arch/arm/mach-pxa/spitz.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/spitz.h rename to arch/arm/mach-pxa/spitz.h index 04828d8918aa..f97e3ebd762d 100644 --- a/arch/arm/mach-pxa/include/mach/spitz.h +++ b/arch/arm/mach-pxa/spitz.h @@ -11,7 +11,7 @@ #define __ASM_ARCH_SPITZ_H 1 #endif -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO, PXA_GPIO_TO_IRQ */ +#include /* PXA_NR_BUILTIN_GPIO, PXA_GPIO_TO_IRQ */ #include /* Spitz/Akita GPIOs */ diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 201dabe883b6..6689b67f9ce5 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c @@ -19,7 +19,7 @@ #include #include -#include +#include "spitz.h" #include "pxa27x.h" #include "sharpsl_pm.h" diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index f7babffb7228..8fcdade9c8dd 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c @@ -14,13 +14,12 @@ #include #include #include -#include +#include #include #include #include #include -#include #include "../codecs/wm8750.h" #include "pxa2xx-i2s.h" @@ -37,7 +36,7 @@ static int spitz_jack_func; static int spitz_spk_func; -static int spitz_mic_gpio; +static struct gpio_desc *gpiod_mic, *gpiod_mute_l, *gpiod_mute_r; static void spitz_ext_control(struct snd_soc_dapm_context *dapm) { @@ -56,8 +55,8 @@ static void spitz_ext_control(struct snd_soc_dapm_context *dapm) snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack"); - gpio_set_value(SPITZ_GPIO_MUTE_L, 1); - gpio_set_value(SPITZ_GPIO_MUTE_R, 1); + gpiod_set_value(gpiod_mute_l, 1); + gpiod_set_value(gpiod_mute_r, 1); break; case SPITZ_MIC: /* enable mic jack and bias, mute hp */ @@ -65,8 +64,8 @@ static void spitz_ext_control(struct snd_soc_dapm_context *dapm) snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); snd_soc_dapm_enable_pin_unlocked(dapm, "Mic Jack"); - gpio_set_value(SPITZ_GPIO_MUTE_L, 0); - gpio_set_value(SPITZ_GPIO_MUTE_R, 0); + gpiod_set_value(gpiod_mute_l, 0); + gpiod_set_value(gpiod_mute_r, 0); break; case SPITZ_LINE: /* enable line jack, disable mic bias and mute hp */ @@ -74,8 +73,8 @@ static void spitz_ext_control(struct snd_soc_dapm_context *dapm) snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack"); snd_soc_dapm_enable_pin_unlocked(dapm, "Line Jack"); - gpio_set_value(SPITZ_GPIO_MUTE_L, 0); - gpio_set_value(SPITZ_GPIO_MUTE_R, 0); + gpiod_set_value(gpiod_mute_l, 0); + gpiod_set_value(gpiod_mute_r, 0); break; case SPITZ_HEADSET: /* enable and unmute headset jack enable mic bias, mute L hp */ @@ -83,8 +82,8 @@ static void spitz_ext_control(struct snd_soc_dapm_context *dapm) snd_soc_dapm_enable_pin_unlocked(dapm, "Mic Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); snd_soc_dapm_enable_pin_unlocked(dapm, "Headset Jack"); - gpio_set_value(SPITZ_GPIO_MUTE_L, 0); - gpio_set_value(SPITZ_GPIO_MUTE_R, 1); + gpiod_set_value(gpiod_mute_l, 0); + gpiod_set_value(gpiod_mute_r, 1); break; case SPITZ_HP_OFF: @@ -93,8 +92,8 @@ static void spitz_ext_control(struct snd_soc_dapm_context *dapm) snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack"); snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); - gpio_set_value(SPITZ_GPIO_MUTE_L, 0); - gpio_set_value(SPITZ_GPIO_MUTE_R, 0); + gpiod_set_value(gpiod_mute_l, 0); + gpiod_set_value(gpiod_mute_r, 0); break; } @@ -199,7 +198,7 @@ static int spitz_set_spk(struct snd_kcontrol *kcontrol, static int spitz_mic_bias(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { - gpio_set_value_cansleep(spitz_mic_gpio, SND_SOC_DAPM_EVENT_ON(event)); + gpiod_set_value_cansleep(gpiod_mic, SND_SOC_DAPM_EVENT_ON(event)); return 0; } @@ -287,39 +286,28 @@ static int spitz_probe(struct platform_device *pdev) struct snd_soc_card *card = &snd_soc_spitz; int ret; - if (machine_is_akita()) - spitz_mic_gpio = AKITA_GPIO_MIC_BIAS; - else - spitz_mic_gpio = SPITZ_GPIO_MIC_BIAS; - - ret = gpio_request(spitz_mic_gpio, "MIC GPIO"); - if (ret) - goto err1; - - ret = gpio_direction_output(spitz_mic_gpio, 0); - if (ret) - goto err2; + gpiod_mic = devm_gpiod_get(&pdev->dev, "mic", GPIOD_OUT_LOW); + if (IS_ERR(gpiod_mic)) + return PTR_ERR(gpiod_mic); + gpiod_mute_l = devm_gpiod_get(&pdev->dev, "mute-l", GPIOD_OUT_LOW); + if (IS_ERR(gpiod_mute_l)) + return PTR_ERR(gpiod_mute_l); + gpiod_mute_r = devm_gpiod_get(&pdev->dev, "mute-r", GPIOD_OUT_LOW); + if (IS_ERR(gpiod_mute_r)) + return PTR_ERR(gpiod_mute_r); card->dev = &pdev->dev; ret = devm_snd_soc_register_card(&pdev->dev, card); - if (ret) { + if (ret) dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret); - goto err2; - } - - return 0; -err2: - gpio_free(spitz_mic_gpio); -err1: return ret; } static int spitz_remove(struct platform_device *pdev) { - gpio_free(spitz_mic_gpio); return 0; } From patchwork Fri Oct 18 15:41:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 176890 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1033464ill; Fri, 18 Oct 2019 08:45:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAA6DrPNki+Es4Ysb218sSBJ60ZPwnnZ4SMeYLyBWl2VDeymYIuHrRyjHopqforDYqhgwb X-Received: by 2002:a17:907:2095:: with SMTP id pv21mr8865725ejb.324.1571413524406; Fri, 18 Oct 2019 08:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571413524; cv=none; d=google.com; s=arc-20160816; b=W2/aXxGGB+PsanZyRGhKTAvZFsaNSzuPlWXgTzKV2mdZk5qL+B5VYJZvrWX5npHiKs JE5r2JktH2bG6sFioqplS9ydD4AKqbcmNHz6TH+G+SYfGy8Q8zuNRLoxXCuN1SIBGhtO xPVUOmnCplK12pLrJETeo6/ky3zFayfZ2aetufiUl43Jmuh8FcrcU18NhEkaMTec6fE6 uOo/qZxbQq5S1s4H0izmpDhOzrKrN84rxLKN1FK14bbD2wxcFSgrZT4craNdJM6IbY0I h5okP209kJOGrMMgX9do2fKZAQF1Y6isnapXRz4xIG3O71Zbnw/xd4u4ZG5tkoZuWRAs x0yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wExNTCfJX1Uc01oDF2FZKLb/dTBy3nx/1mTyB6+pOIc=; b=Ytaxt9+qBiDpsZUTkwiak/o9iE8HR7vMucwD4mF6qsHUbWgQyiTilADDolKTfCLTfC Bc4NERJnxHeh+UkQWhAFJchcrP5O3qveocS7Ledf256xKRlpcyinAxzEHbRVDdHJixg9 SIK3k+uTejNpKuHkTKbWgDu1Kri94OhYvd+hiVXtTJn4XVWx1nNPYuwSUj1Qlc7Y7HyT kP23zONnX5GXUJe1UBorKodCi/33968Kxe3fal/CVqMi5VHHqUYVbJc31eh7pQoLht4I haOmRFfCQdsuyjCoYZEWWEgov2lA5g1K6RW2WVW0IoiYk//8jfcEkJKPy2ZLamjEinAF jZDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si3991186eda.411.2019.10.18.08.45.24; Fri, 18 Oct 2019 08:45:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbfJRPpW (ORCPT + 26 others); Fri, 18 Oct 2019 11:45:22 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:34817 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502026AbfJRPmi (ORCPT ); Fri, 18 Oct 2019 11:42:38 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1N4i7l-1hwI681tGp-011kPC; Fri, 18 Oct 2019 17:42:27 +0200 From: Arnd Bergmann To: Daniel Mack , Haojian Zhuang , Robert Jarzmik Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Arnd Bergmann , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH 22/46] ARM: pxa: eseries: use gpio lookup for audio Date: Fri, 18 Oct 2019 17:41:37 +0200 Message-Id: <20191018154201.1276638-22-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191018154052.1276506-1-arnd@arndb.de> References: <20191018154052.1276506-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:CBcymaRS0Tk88pjlgZFlVH3qNWbEbuDVF8a1b0EpQ/ufN479pdc WxFmWIlqotX3JQXT1UAKIf1sTu64lmAPRbAdvtGuVVyNIp/b1FBfzpc38avAXbnmvVWSxB+ THaBpbtDkyxI+IuDBkaedReH04nEZoxLa1P0P3R2h3lrYJAy5YIQRScepXWmBKeD8hEG96c 9hNT8Ux7/BXibSUbTSM2w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:taDEs8Sqbxw=:6tf02R9ujNhRlrPOWMgX5M 4NJrSoZ4kukKw3v6dsAkqsUHJZ3EYRhppr/joEDDcltHnCT6Wu1jNP20Z1x6yB+EYP6Cp901O /4SF2XBUSU7OJWlzDhCFb5HvOlWDV4K/++Uk3RGsofv5mB7fehtDmdYceMvyKQ7iXtnryjSg5 BcmgGsVjA5HvBzm7HI8+l2EWmC8ZjzeZCvm7gJcqGZsyEnYMTdWpbiflwdIC/WMWdcWXaYYOg wCthjJBoHnyaRcKNGHSPdXnHrD1LeUz/QXKaut4BDRnHe1qb8qOCukK+kCvYfuBY7fmU95Tjm fcOzXx4M5OGj+JeVyjHkz3EENRP8s0Qtgj3J5gWhO1WN4slu387pjRreP5hz9L4eNXnOqisH4 5fk9jdOEnoFiw//R7isRZ6Xy4cTTH6m6hZJoofa7SBfUx2QG2awqU2q6OpOAEUqXtjfObf3GL chBXSFBb918kuH8ucKrWhVOVeJwQcPubIC5WXHgBZKUotyhYejQVVah76vFWVoY5K71BeUzgA MHzLSjtj4rm6z9aLykxp54+pu2pAyEiFkBGwqp8OPN5q0vmuD1iXogaOeYP3yUr+GV+ckRHn3 mDvFLEU5OQsLksZ/FJA08pacmcmeICKeetZfJ6QFYmBHZVBrd+4JQNiGKUHs9jPbP6PRZOsrX tWHoabJj4Fa0cKwimfwZKxePXyPUaknxGYCFQN9V141zOvNApDmUEKyxqVGlYW5gGDzKzS6s6 rHpXtRc/SCJ07eyBNJ8Y71YNvS4+lBYz9vnkS0Fp1PpgQI3Rgi3R4fc1TVm0dYPgaOhdmOEaP h4PVUuJBtOh+8AfWczbBT9zD+imhrJceTz3Rsf9rFgchfYvrEPS0u6BQFS/STC/iegBeGM9zg 2+2fHfghINeIdxqAA6iA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The three eseries machines have very similar drivers for audio, all using the mach/eseries-gpio.h header for finding the gpio numbers. Change these to use gpio descriptors to avoid the header file dependency. I convert the _OFF gpio numbers into GPIO_ACTIVE_LOW ones for consistency here. Cc: Mark Brown Cc: alsa-devel@alsa-project.org Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/eseries.c | 32 ++++++++++++++++++++++++++++++++ sound/soc/pxa/e740_wm9705.c | 35 ++++++++++++++++++----------------- sound/soc/pxa/e750_wm9705.c | 31 ++++++++++++++----------------- sound/soc/pxa/e800_wm9712.c | 31 ++++++++++++++----------------- 4 files changed, 78 insertions(+), 51 deletions(-) -- 2.20.0 Acked-by: Mark Brown Acked-by: Robert Jarzmik Reviewed-by: Linus Walleij diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index d8a87ff66675..8399ce405093 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c @@ -24,6 +24,7 @@ #include #include #include +#include #include