From patchwork Thu Jul 14 11:11:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102017 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp20895qga; Thu, 14 Jul 2016 04:13:37 -0700 (PDT) X-Received: by 10.98.103.214 with SMTP id t83mr11548756pfj.158.1468494817726; Thu, 14 Jul 2016 04:13:37 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id i187si3723961pfc.211.2016.07.14.04.13.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 04:13:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZL-0007Hh-Pf; Thu, 14 Jul 2016 11:12:39 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ3-00070e-4B for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 11:12:24 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LjOHr-1aosVE0XOx-00dW5t; Thu, 14 Jul 2016 13:11:51 +0200 From: Arnd Bergmann To: Wan Zongshun Subject: [PATCH 1/7] ARM: nuc900: move regs-ldm.h to video driver Date: Thu, 14 Jul 2016 13:11:29 +0200 Message-Id: <20160714111135.2476095-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:1oCe4odYMTxcqi0V/oZsDyfP2+NG2YStrRMO+RbIUQ14Zz3pEKD JFzKJpSTXzRZpu8hnYfcOhYNMdAYJTwwsVJQgMtCCaiu6sUrT/4CfoEQ9rnaXk010vSYhZS LgnQZPUwSywSXZej6Cuosk/V/3/H3fV7jC+76D1pHJvFwEpd2vzfC818Nn3OzDTI0nPdTNR IekpoATmqHwpBx/OTMAug== X-UI-Out-Filterresults: notjunk:1; V01:K0:gJKnIGTfhNM=:BCHYwZRqSw6Xd7TVgUJKmB JAB0WV1SPO/P9wSArCf0nQCaaNtYBmCll1n8tD0JczuijQCyjz/q+FhJ6Ye4g30py2KCViMvQ hDvdGTqdUO1T9s69guK8getY4J1rw6ti35Zi1yex/RgDcyXmD/K2pT7xwfgP1ABzXlxhANe0v 0WSz0nFW8u96wiFCKEOQpMXVG9pk5WIwOF6Id2eXgMfZmfcemS9uNPfEvhIniK+ZhwsiU19kB ErenYSVvLrpgYhtOZ7Awh9UHc+ADakCIvfPgWkY5L4WdlUL+RjU6lbiiIZP3IseWa/wY2kKjx E6rZgetgH3FwdbEfzj48rPSqXO0Kwj5VNIMkKEyZjw/isSq01+Qk5qXJ1dGJOA4uyfu/MWQwP 0Abx91iuk/VjUSMMk2JrTc+W0N6pNTH4kWUBNr8r6E3EYPw+cEMZUKExhi4mG6A/Vq3AuYu+/ cG3I7xorQybKk1xhjewKJREcbSQJzvFvmj3rM6nNfuqUYYQytnzvPlJsrmXHDWKjAuMRzWNwa mdYg5G0fKR8VrB7tK3CpBnGDiuPiPGUQLXOF7+PJyrls3w6zIy+dnS802OKgUe0uzNKddlaU+ kI3sJz6MLZb6hY9+hx2OPQgxg3Ars6hCX7iC5Vtmx6GxSgGjP6E7C2fqkgyLb8WxKpyINZUaO WjD/uxF1qgIX3si3kY1R5bsFVIjmk8aprp8ZHpEpDxxy2sH05ySoQAL95RdAuLt7G4yo= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_041221_588839_CB378108 X-CRM114-Status: GOOD ( 16.70 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.135 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.135 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Wan Zongshun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This is one of only three nuc900 drivers that use mach/*.h headers, and it's fairly easy to avoid if we separate the LCM_DCCS_VA_SRC definition that is needed for platform data from the other registers: The global mach/regs-ldm.h file becomes a local nuc900fb-regs.h header, and is only used by that one driver, while the LCM_DCCS_VA_SRC enum gets moved into the platform_data header that uses it, to let the device definition see the values. The only other reference to a header in the framebuffer driver is for the pin configuration, and we can simply avoid that by passing the address along with the data and mask. Signed-off-by: Arnd Bergmann --- arch/arm/mach-w90x900/dev.c | 3 ++- .../regs-ldm.h => drivers/video/fbdev/nuc900fb-regs.h | 15 --------------- drivers/video/fbdev/nuc900fb.c | 8 +++----- drivers/video/fbdev/nuc900fb.h | 1 - include/linux/platform_data/video-nuc900fb.h | 14 +++++++++++++- 5 files changed, 18 insertions(+), 23 deletions(-) rename arch/arm/mach-w90x900/include/mach/regs-ldm.h => drivers/video/fbdev/nuc900fb-regs.h (94%) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index e65a80a1ac75..ea84f053bcd3 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include "cpu.h" @@ -455,8 +454,10 @@ static struct nuc900fb_mach_info nuc900_fb_info = { #endif .num_displays = ARRAY_SIZE(nuc900_lcd_info), .default_display = 0, + .gpio_dir_addr = W90X900_VA_GPIO + 0x54, .gpio_dir = 0x00000004, .gpio_dir_mask = 0xFFFFFFFD, + .gpio_data_addr = W90X900_VA_GPIO + 0x58, .gpio_data = 0x00000004, .gpio_data_mask = 0xFFFFFFFD, }; diff --git a/arch/arm/mach-w90x900/include/mach/regs-ldm.h b/drivers/video/fbdev/nuc900fb-regs.h similarity index 94% rename from arch/arm/mach-w90x900/include/mach/regs-ldm.h rename to drivers/video/fbdev/nuc900fb-regs.h index e9d480a5b232..c6ba567bb11f 100644 --- a/arch/arm/mach-w90x900/include/mach/regs-ldm.h +++ b/drivers/video/fbdev/nuc900fb-regs.h @@ -1,6 +1,4 @@ /* - * arch/arm/mach-w90x900/include/mach/regs-serial.h - * * Copyright (c) 2009 Nuvoton technology corporation * All rights reserved. * @@ -19,8 +17,6 @@ #ifndef __ASM_ARM_W90X900_REGS_LDM_H #define __ASM_ARM_W90X900_REGS_LDM_H -#include - /* Display Controller Control/Status Register */ #define REG_LCM_DCCS (0x00) @@ -33,17 +29,6 @@ #define LCM_DCCS_FIELD_INTR (1 << 6) #define LCM_DCCS_SINGLE (1 << 7) -enum LCM_DCCS_VA_SRC { - LCM_DCCS_VA_SRC_YUV422 = (0 << 8), - LCM_DCCS_VA_SRC_YCBCR422 = (1 << 8), - LCM_DCCS_VA_SRC_RGB888 = (2 << 8), - LCM_DCCS_VA_SRC_RGB666 = (3 << 8), - LCM_DCCS_VA_SRC_RGB565 = (4 << 8), - LCM_DCCS_VA_SRC_RGB444LOW = (5 << 8), - LCM_DCCS_VA_SRC_RGB444HIGH = (7 << 8) -}; - - /* Display Device Control Register */ #define REG_LCM_DEV_CTRL (0x04) diff --git a/drivers/video/fbdev/nuc900fb.c b/drivers/video/fbdev/nuc900fb.c index 6680edae4696..d29777d85518 100644 --- a/drivers/video/fbdev/nuc900fb.c +++ b/drivers/video/fbdev/nuc900fb.c @@ -35,11 +35,9 @@ #include #include -#include -#include -#include #include +#include "nuc900fb-regs.h" #include "nuc900fb.h" @@ -373,9 +371,9 @@ static int nuc900fb_init_registers(struct fb_info *info) writel(0, regs + REG_LCM_DEV_CTRL); /* config gpio output */ - modify_gpio(W90X900_VA_GPIO + 0x54, mach_info->gpio_dir, + modify_gpio(mach_info->gpio_dir_addr, mach_info->gpio_dir, mach_info->gpio_dir_mask); - modify_gpio(W90X900_VA_GPIO + 0x58, mach_info->gpio_data, + modify_gpio(mach_info->gpio_data_addr, mach_info->gpio_data, mach_info->gpio_data_mask); return 0; diff --git a/drivers/video/fbdev/nuc900fb.h b/drivers/video/fbdev/nuc900fb.h index 9a1ca6dbb6b2..a904ef17c122 100644 --- a/drivers/video/fbdev/nuc900fb.h +++ b/drivers/video/fbdev/nuc900fb.h @@ -15,7 +15,6 @@ #ifndef __NUC900FB_H #define __NUC900FB_H -#include #include enum nuc900_lcddrv_type { diff --git a/include/linux/platform_data/video-nuc900fb.h b/include/linux/platform_data/video-nuc900fb.h index cec5ece765ed..dbce9dd7a294 100644 --- a/include/linux/platform_data/video-nuc900fb.h +++ b/include/linux/platform_data/video-nuc900fb.h @@ -38,10 +38,20 @@ struct nuc900fb_hw { unsigned int lcd_va_stuff; }; +enum LCM_DCCS_VA_SRC { + LCM_DCCS_VA_SRC_YUV422 = (0 << 8), + LCM_DCCS_VA_SRC_YCBCR422 = (1 << 8), + LCM_DCCS_VA_SRC_RGB888 = (2 << 8), + LCM_DCCS_VA_SRC_RGB666 = (3 << 8), + LCM_DCCS_VA_SRC_RGB565 = (4 << 8), + LCM_DCCS_VA_SRC_RGB444LOW = (5 << 8), + LCM_DCCS_VA_SRC_RGB444HIGH = (7 << 8) +}; + /* LCD Display Description */ struct nuc900fb_display { /* LCD Image type */ - unsigned type; + enum LCM_DCCS_VA_SRC type; /* LCD Screen Size */ unsigned short width; @@ -72,8 +82,10 @@ struct nuc900fb_mach_info { unsigned num_displays; unsigned default_display; /* GPIO Setting Info */ + void __iomem *gpio_dir_addr; unsigned gpio_dir; unsigned gpio_dir_mask; + void __iomem *gpio_data_addr; unsigned gpio_data; unsigned gpio_data_mask; }; From patchwork Thu Jul 14 11:11:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102016 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp21061qga; Thu, 14 Jul 2016 04:13:58 -0700 (PDT) X-Received: by 10.66.220.73 with SMTP id pu9mr21546710pac.77.1468494838132; Thu, 14 Jul 2016 04:13:58 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id m75si303117pfa.29.2016.07.14.04.13.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 04:13:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZd-0007WM-IO; Thu, 14 Jul 2016 11:12:57 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ3-00070l-Gc for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 11:12:24 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0M8mxE-1bXWyh1Keq-00C7cc; Thu, 14 Jul 2016 13:11:51 +0200 From: Arnd Bergmann To: Wan Zongshun Subject: [PATCH 2/7] ARM: nuc900: avoid ASoC header dependency Date: Thu, 14 Jul 2016 13:11:30 +0200 Message-Id: <20160714111135.2476095-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160714111135.2476095-1-arnd@arndb.de> References: <20160714111135.2476095-1-arnd@arndb.de> X-Provags-ID: V03:K0:IkHSfsBvuHyQPSaHqe5EbbT7creRWfN/NTHAEZ0MxYpfkGi+Xha L+4CaPB+tyLzaQ3xBn12SnmOTh38BzJ19B5r6cMnpiAFAeUtVEZtv3HQTa14HWDWiNNWCdb MPYcZriAOwQE5BSRiO3XWbPD8FyniG9qCn/XTZp8LhuCkVpO/+8YtNhundJX6BKzJlJFVfn iyggbD2dBuP/e9iryJfbw== X-UI-Out-Filterresults: notjunk:1; V01:K0:WMJFtM3Nk44=:NHALtUMdjAEXjCQq07AbfL jmoYgkqVODF9xA2Mr80yCMns/k2Z9ytbzdFUiqY/ERkLTu+2ZQu0E6OrtCXn5vDUgTE4YW17N 2H+2dliM806pYTQhkalJbwu5iLtWDqMxYLTBV95JwK13d20OzAUEhbwN5XNOM2ZUYE/UiJtHx WU7sgzTM1cuBo//Ru3wl3H+ie3wgyX3KWKFSzP0J2Pb7t/mUq3BZEUbAhesGDdeimzdIcJz3/ AwFRzAaG9Ey+0bypYeKjY9tebtMayaCsUxBzUBWpBDVdoS5mVnkq4HkyWz2FRls01IVEtqK1Q T1X3XHlTG/LMGCxzgTXAfM7P7J/F4sY0wnHMBbWqY8Rrmzoxtz/FyDoQLJOs8dqNHitlahaul qGm4CAKQK7aOzbEsfq6SDxZQ0J5hH2UPJTSbKElaxi7OoAEwnjTUyLY86wcR+HMSSfWtJXb6n 5jb4DCyNHMH+zOR8HBIZ5d5GuHwj4AKL64+Czb4y41N8Sh6lyLF4ZZcp1Q2cwhRPoX8XnwRwt TzXFKoVAn/sE5K9FSxIgFshMTtAKkgfnPCPcaLC++UN6Zhj2GCyxbdU/9uQLxKPam/5rptfL9 AtuzWDkgasn/cxbMBE+Stui5T1czd7qsm1mUEftpvhm14XGjVxlFFPcbPD/rZo7cJkCyndg0u ZgoxQoE40wQKiMirhEguZjQapya81n392vkhRFaNo4W+N2m2SjGqj1Nf/tJW20uOeTBY= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_041222_005645_89ED259A X-CRM114-Status: GOOD ( 12.18 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.130 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.130 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Wan Zongshun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The ac97 driver remains as one of the few places using w90x900/nuc900 mach/*.h header files for the purpose of pin configuration. We can avoid that by passing a pointer to the one function it needs to call as platform data. Signed-off-by: Arnd Bergmann --- arch/arm/mach-w90x900/dev.c | 1 + sound/soc/nuc900/nuc900-ac97.c | 6 ++++-- sound/soc/nuc900/nuc900-pcm.c | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index ea84f053bcd3..9c9292feb066 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c @@ -512,6 +512,7 @@ struct platform_device nuc900_device_ac97 = { .dev = { .dma_mask = &nuc900_device_audio_dmamask, .coherent_dma_mask = -1, + .platform_data = mfp_set_groupg, } }; diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index b6615affe571..04bb89f0b6a4 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c @@ -22,8 +22,6 @@ #include #include -#include - #include "nuc900-audio.h" static DEFINE_MUTEX(ac97_mutex); @@ -320,6 +318,8 @@ static const struct snd_soc_component_driver nuc900_ac97_component = { static int nuc900_ac97_drvprobe(struct platform_device *pdev) { + void (*mfp_set_groupg)(struct device *dev, const char *subname); + struct nuc900_audio *nuc900_audio; int ret; @@ -362,6 +362,8 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev) if (ret) goto out; + mfp_set_groupg = platform_get_drvdata(pdev); + /* enbale ac97 multifunction pin */ mfp_set_groupg(nuc900_audio->dev, NULL); diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c index 2cca055fd806..70883ec94f89 100644 --- a/sound/soc/nuc900/nuc900-pcm.c +++ b/sound/soc/nuc900/nuc900-pcm.c @@ -21,8 +21,6 @@ #include #include -#include - #include "nuc900-audio.h" static const struct snd_pcm_hardware nuc900_pcm_hardware = { From patchwork Thu Jul 14 11:11:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102013 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp21609qga; Thu, 14 Jul 2016 04:15:09 -0700 (PDT) X-Received: by 10.98.38.69 with SMTP id m66mr11616705pfm.57.1468494909258; Thu, 14 Jul 2016 04:15:09 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id v88si4316123pfj.110.2016.07.14.04.15.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 04:15:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeaa-0008EL-3T; Thu, 14 Jul 2016 11:13:56 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ4-00071A-Bo for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 11:12:26 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MVq96-1buXTL289w-00X4HS; Thu, 14 Jul 2016 13:11:51 +0200 From: Arnd Bergmann To: Wan Zongshun Subject: [PATCH 3/7] ARM: nuc900: use MULTI_IRQ_HANDLER Date: Thu, 14 Jul 2016 13:11:31 +0200 Message-Id: <20160714111135.2476095-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160714111135.2476095-1-arnd@arndb.de> References: <20160714111135.2476095-1-arnd@arndb.de> X-Provags-ID: V03:K0:lXHuEkuOesxwMjPYaZQHuS74xZwOoN+RUeOghgg/3ce7QaXrAXv 2DVcPXcqiM5yFTxApB1hpkT5Kqaech6Lk2rOMzXhzJP9Qxp5/CfGYriMfuJEOSv+BLj9ukN xRuhlCi2htLtcUaI6BXQIx2WKTIvnzQ4jKJzzUqwSLp5rO9/kNLnS5tQ6+17p//Tjyhbe9X TCefKL+0Z8ucXBB/zMIAg== X-UI-Out-Filterresults: notjunk:1; V01:K0:MSuvtQeA0yg=:TLQAYd1Yo+FiqyzfnC7Fo9 6ykczHGArM53ry4A1RZme5CJtt4RiPYU49jcAujEuGuY5PkQS219wBne+qBvxtt+5gWvP83g+ 6UNR3auBrIm7lPz/Oeyyta89cwLaHRn5qXHqdC5yHbBh9F9JGa2dmlC1n6BzoF187F9ERQkSy 8Vju49otKYujiuS6KiCbyp6Y3EIsao5HsVBd4pfCKVXkrY2SRdNk8f2zIh5vPLwrCXTsFTJMj E750/kCxu/aj5Snnsh8U/M9+4fh8SQyySNqYVNnfh3o8QOzQ6kTZF+pbABFRd151W+WpXEXzD Vqw+Xa/+quOsZ47f302X8d5rDfIzMOHwQuR3Cf56UgJ4Venid7g/ikHrUIB3PmfNQ4jv5n+IY olU1MDg3S+UPZ+y7oQjMftncA6Nj5c4yn1/4WnWe8qEbR41jGZjlUasIWMn96JGlQRzBw9Z0d rPcNYoCpG/OsuiLQkZBmq28BBdXnybELq6PV+7CWJHtVD+o5Zg43CMREPANFr6hipMmxD+KTd eca2W18HV5znLpbiujRNLDcP/EdOWPUIf+KBagu3PcIhKTAzzodxPT3pTIybdqVHLXAl4DESu P6xZA+HAfNrTEHaR7zSQ4KAFHBuXWYq7N6AVW0avTpmyXQxHtXzbdKXnFRJT5AfJAPXLlldJS 8bnqfhzCqg+5o65rJ7xDpqTyXHOLu7s04q1DRxuxcuR+ypX1JBWOCXbh3ghPpo5tK2PM= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_041222_966298_514F1D43 X-CRM114-Status: GOOD ( 15.13 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.134 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.134 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Wan Zongshun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org To clean up the header files, the inline IRQ entry is being replaced with a modern handle_irq() function doing the same thing. This is also required for multiplatform support. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 1 + arch/arm/mach-w90x900/include/mach/entry-macro.S | 26 ------------------------ arch/arm/mach-w90x900/irq.c | 13 ++++++++++++ 3 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 arch/arm/mach-w90x900/include/mach/entry-macro.S -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 36f721c2eb97..908694886088 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -503,6 +503,7 @@ config ARCH_W90X900 select CPU_ARM926T select GENERIC_CLOCKEVENTS select GPIOLIB + select MULTI_IRQ_HANDLER help Support for Nuvoton (Winbond logic dept.) ARM9 processor, At present, the w90x900 has been renamed nuc900, regarding diff --git a/arch/arm/mach-w90x900/include/mach/entry-macro.S b/arch/arm/mach-w90x900/include/mach/entry-macro.S deleted file mode 100644 index 0ff612ac95ba..000000000000 --- a/arch/arm/mach-w90x900/include/mach/entry-macro.S +++ /dev/null @@ -1,26 +0,0 @@ -/* - * arch/arm/mach-w90x900/include/mach/entry-macro.S - * - * Low-level IRQ helper macros for W90P910-based platforms - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - * - */ - -#include -#include - - .macro get_irqnr_preamble, base, tmp - .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - - mov \base, #AIC_BA - - ldr \irqnr, [\base, #AIC_IPER] - ldr \irqnr, [\base, #AIC_ISNR] - cmp \irqnr, #0 - - .endm diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c index 491b317daffa..6ef0ae50a23f 100644 --- a/arch/arm/mach-w90x900/irq.c +++ b/arch/arm/mach-w90x900/irq.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -202,10 +203,22 @@ static struct irq_chip nuc900_irq_chip = { .irq_unmask = nuc900_irq_unmask, }; +static void __exception_irq_entry nuc900_handle_irq(struct pt_regs *regs) +{ + int hwirq; + + (void)readl(REG_AIC_IPER); + hwirq = readl(REG_AIC_ISNR); + + handle_IRQ(hwirq, regs); +} + void __init nuc900_init_irq(void) { int irqno; + set_handle_irq(nuc900_handle_irq); + __raw_writel(0xFFFFFFFE, REG_AIC_MDCR); for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) { From patchwork Thu Jul 14 11:11:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102015 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp21230qga; Thu, 14 Jul 2016 04:14:21 -0700 (PDT) X-Received: by 10.98.72.201 with SMTP id q70mr11567651pfi.159.1468494861136; Thu, 14 Jul 2016 04:14:21 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id bx10si1058914pad.282.2016.07.14.04.14.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 04:14:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZt-0007iF-Kr; Thu, 14 Jul 2016 11:13:13 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ2-00070Y-HM for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 11:12:24 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MWfUd-1bti7o2suZ-00XtMP; Thu, 14 Jul 2016 13:11:51 +0200 From: Arnd Bergmann To: Wan Zongshun Subject: [PATCH 4/7] ARM: nuc900: make most header files local Date: Thu, 14 Jul 2016 13:11:32 +0200 Message-Id: <20160714111135.2476095-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160714111135.2476095-1-arnd@arndb.de> References: <20160714111135.2476095-1-arnd@arndb.de> X-Provags-ID: V03:K0:K6EGTehp3F1/XozMfROcYUc96VtS0ZODlqM3HlYdIegNJPZwV3h dEr3wT/nFXDpMfM4U36vz77F9+dsvjyZVWKKz9sDEno52MKSwqcL4h/OARVw6CD7PxTtc4X wSaUb3aeBZQSzwOd4tG1Ps0DJYuzuoRU4ftKlWoyRDYg8BFkGvdF1kPKggYb71IhaCwAWQh qSjFi8VRaMDo+3KRSZAaQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:ByImgPAigHg=:OELkFAbHd2KiSML7BpX4px H9ZqOBYSfYYf2FEODVMqFn9xx9xcxtKrUSlre3catNu7kaB9m9Ch2GENfFSz0SC6n4fozVhLI CIZDscSoJz8uFtmX6JohmxhDWsZnbf2EnJX2zXr7lzFPoAtokRE2Txm21P7OBI6TJwA8/A5vd 4uZ065blPicVYTt24Zzlr3NT8xrfyw2NJTpVSHhzgejJ2gjDi/yHRegB4WEc9HTqHQblAX95Y zzsLRSKQpnNZWyU7YeK2DyNLEAQKwaYdVgFnwho+aYUcGZG+TgTGknfTMtTvu12d0UELms+h4 +wrtt+tTeT+ORyCcgcnYbPORjoLyEL/KREPNgs6/6Q86LMKhluh7sxi8lyosikIlkqNweyPIs hg476G1kuu5J61FaLgnszL2zp3uB3cMW4ls8cbbRdzInh9FHN1xTZ3tF/JL7TAblFH4wqd89m tZpwMDw49AS4W9Fa8ZtFAvAiDKXIfMQjeCbypbOC/4fblzjIivJPRpuPHliXi8jxuJzE14lDP 4rbV/z3Q9ioyNxnQU6MNuxqzgNwhRx2F6Zo5Cir+xZLe8UwVeYAZuxTdfXg2MYj2Ow9r35z0v D2j02Ew8jqH2FDmr35TjZoefM/7sgAyNOWmjXO5VRRzEISIXZAt3xM/QOrU2ehjJzPzS/XvO/ UP1Z+0TsekIfcxhipYVENThP5qOExbiLQ+GorAUiFcNnDNOjWAP09CLUmud/GUghV1ow= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_041220_995357_B7D1C266 X-CRM114-Status: GOOD ( 15.21 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.187 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.187 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Wan Zongshun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Once we enable CONFIG_ARCH_MULTIPLATFORM, we no longer reference the include/mach/ directory for header files, so they become invisible to the existing users. Since all users of the headers are now in arch/arm/mach-w90x900/, we can simply move the headers to the same place and include them using "" instead of <>. The only exception is mach/uncompress.h, which gets included by the zImage uncompress code for non-multiplatform configurations, so the header remains there for the moment, and I add the few macros it actually needs there to let it be included standalone. Signed-off-by: Arnd Bergmann --- arch/arm/mach-w90x900/clksel.c | 4 ++-- arch/arm/mach-w90x900/clock.c | 2 +- arch/arm/mach-w90x900/cpu.c | 6 +++--- arch/arm/mach-w90x900/dev.c | 3 +-- arch/arm/mach-w90x900/gpio.c | 2 +- arch/arm/mach-w90x900/include/mach/hardware.h | 24 ---------------------- arch/arm/mach-w90x900/include/mach/uncompress.h | 5 +++-- arch/arm/mach-w90x900/irq.c | 5 ++--- arch/arm/mach-w90x900/mach-nuc910evb.c | 2 +- arch/arm/mach-w90x900/mach-nuc950evb.c | 2 +- arch/arm/mach-w90x900/mach-nuc960evb.c | 2 +- arch/arm/mach-w90x900/{include/mach => }/map.h | 0 arch/arm/mach-w90x900/mfp.c | 2 +- arch/arm/mach-w90x900/{include/mach => }/mfp.h | 0 arch/arm/mach-w90x900/nuc910.c | 2 +- arch/arm/mach-w90x900/nuc950.c | 2 +- arch/arm/mach-w90x900/nuc960.c | 2 +- .../mach-w90x900/{include/mach => }/regs-clock.h | 2 -- .../arm/mach-w90x900/{include/mach => }/regs-irq.h | 2 -- .../mach-w90x900/{include/mach => }/regs-serial.h | 2 -- arch/arm/mach-w90x900/time.c | 3 +-- 21 files changed, 21 insertions(+), 53 deletions(-) delete mode 100644 arch/arm/mach-w90x900/include/mach/hardware.h rename arch/arm/mach-w90x900/{include/mach => }/map.h (100%) rename arch/arm/mach-w90x900/{include/mach => }/mfp.h (100%) rename arch/arm/mach-w90x900/{include/mach => }/regs-clock.h (96%) rename arch/arm/mach-w90x900/{include/mach => }/regs-irq.h (96%) rename arch/arm/mach-w90x900/{include/mach => }/regs-serial.h (96%) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-w90x900/clksel.c b/arch/arm/mach-w90x900/clksel.c index 06d867dce551..ae9d53e09b60 100644 --- a/arch/arm/mach-w90x900/clksel.c +++ b/arch/arm/mach-w90x900/clksel.c @@ -21,8 +21,8 @@ #include #include -#include -#include +#include "map.h" +#include "regs-clock.h" #define PLL0 0x00 #define PLL1 0x01 diff --git a/arch/arm/mach-w90x900/clock.c b/arch/arm/mach-w90x900/clock.c index 8b196d094daa..a143d4b8ab38 100644 --- a/arch/arm/mach-w90x900/clock.c +++ b/arch/arm/mach-w90x900/clock.c @@ -21,7 +21,7 @@ #include #include -#include +#include "map.h" #include "clock.h" diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index ca763251ffe0..d96d0e3eb7a6 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c @@ -30,9 +30,9 @@ #include #include -#include -#include -#include +#include "map.h" +#include "regs-serial.h" +#include "regs-clock.h" #include "regs-ebi.h" #include "regs-timer.h" diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index 9c9292feb066..f9f3aa46b1af 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c @@ -34,12 +34,11 @@ #include #include -#include #include -#include #include #include +#include "map.h" #include "cpu.h" /*NUC900 evb norflash driver data */ diff --git a/arch/arm/mach-w90x900/gpio.c b/arch/arm/mach-w90x900/gpio.c index 55d1a00dbd28..ae039e1ca465 100644 --- a/arch/arm/mach-w90x900/gpio.c +++ b/arch/arm/mach-w90x900/gpio.c @@ -22,7 +22,7 @@ #include #include -#include +#include "map.h" #define GPIO_BASE (W90X900_VA_GPIO) #define GPIO_DIR (0x04) diff --git a/arch/arm/mach-w90x900/include/mach/hardware.h b/arch/arm/mach-w90x900/include/mach/hardware.h deleted file mode 100644 index fe3c6265a466..000000000000 --- a/arch/arm/mach-w90x900/include/mach/hardware.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * arch/arm/mach-w90x900/include/mach/hardware.h - * - * Copyright (c) 2008 Nuvoton technology corporation - * All rights reserved. - * - * Wan ZongShun - * - * Based on arch/arm/mach-s3c2410/include/mach/hardware.h - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - */ - -#ifndef __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -#include -#include - -#endif /* __ASM_ARCH_HARDWARE_H */ diff --git a/arch/arm/mach-w90x900/include/mach/uncompress.h b/arch/arm/mach-w90x900/include/mach/uncompress.h index 3855ecebda6e..a1b6ea95e658 100644 --- a/arch/arm/mach-w90x900/include/mach/uncompress.h +++ b/arch/arm/mach-w90x900/include/mach/uncompress.h @@ -20,11 +20,12 @@ /* Defines for UART registers */ -#include -#include #include #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) + +#define UART0_PA W90X900_PA_UART +#define W90X900_PA_UART (0xB8000000) static volatile u32 * const uart_base = (u32 *)UART0_PA; static inline void putc(int ch) diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c index 6ef0ae50a23f..2a6fe35b76e7 100644 --- a/arch/arm/mach-w90x900/irq.c +++ b/arch/arm/mach-w90x900/irq.c @@ -26,9 +26,8 @@ #include #include -#include -#include - +#include "map.h" +#include "regs-irq.h" #include "nuc9xx.h" struct group_irq { diff --git a/arch/arm/mach-w90x900/mach-nuc910evb.c b/arch/arm/mach-w90x900/mach-nuc910evb.c index 92f1c978f35e..e9631784493e 100644 --- a/arch/arm/mach-w90x900/mach-nuc910evb.c +++ b/arch/arm/mach-w90x900/mach-nuc910evb.c @@ -17,8 +17,8 @@ #include #include #include -#include +#include "map.h" #include "nuc910.h" static void __init nuc910evb_map_io(void) diff --git a/arch/arm/mach-w90x900/mach-nuc950evb.c b/arch/arm/mach-w90x900/mach-nuc950evb.c index 26f7189056e3..eb8865b09288 100644 --- a/arch/arm/mach-w90x900/mach-nuc950evb.c +++ b/arch/arm/mach-w90x900/mach-nuc950evb.c @@ -19,9 +19,9 @@ #include #include #include -#include #include +#include "map.h" #include "nuc950.h" static void __init nuc950evb_map_io(void) diff --git a/arch/arm/mach-w90x900/mach-nuc960evb.c b/arch/arm/mach-w90x900/mach-nuc960evb.c index 9b4e73fe10e5..d7b97913af7b 100644 --- a/arch/arm/mach-w90x900/mach-nuc960evb.c +++ b/arch/arm/mach-w90x900/mach-nuc960evb.c @@ -17,8 +17,8 @@ #include #include #include -#include +#include "map.h" #include "nuc960.h" static void __init nuc960evb_map_io(void) diff --git a/arch/arm/mach-w90x900/include/mach/map.h b/arch/arm/mach-w90x900/map.h similarity index 100% rename from arch/arm/mach-w90x900/include/mach/map.h rename to arch/arm/mach-w90x900/map.h diff --git a/arch/arm/mach-w90x900/mfp.c b/arch/arm/mach-w90x900/mfp.c index c58d142b8a46..0d985ff0c57d 100644 --- a/arch/arm/mach-w90x900/mfp.c +++ b/arch/arm/mach-w90x900/mfp.c @@ -21,7 +21,7 @@ #include #include -#include +#include "map.h" #define REG_MFSEL (W90X900_VA_GCR + 0xC) diff --git a/arch/arm/mach-w90x900/include/mach/mfp.h b/arch/arm/mach-w90x900/mfp.h similarity index 100% rename from arch/arm/mach-w90x900/include/mach/mfp.h rename to arch/arm/mach-w90x900/mfp.h diff --git a/arch/arm/mach-w90x900/nuc910.c b/arch/arm/mach-w90x900/nuc910.c index 1523f4136985..59d865c6abfe 100644 --- a/arch/arm/mach-w90x900/nuc910.c +++ b/arch/arm/mach-w90x900/nuc910.c @@ -17,7 +17,7 @@ #include #include -#include +#include "map.h" #include "cpu.h" #include "clock.h" diff --git a/arch/arm/mach-w90x900/nuc950.c b/arch/arm/mach-w90x900/nuc950.c index 5704f74a50ee..340e1a067d3c 100644 --- a/arch/arm/mach-w90x900/nuc950.c +++ b/arch/arm/mach-w90x900/nuc950.c @@ -17,7 +17,7 @@ #include #include -#include +#include "map.h" #include "cpu.h" diff --git a/arch/arm/mach-w90x900/nuc960.c b/arch/arm/mach-w90x900/nuc960.c index 8851a3a27ce2..f01571f8c1f2 100644 --- a/arch/arm/mach-w90x900/nuc960.c +++ b/arch/arm/mach-w90x900/nuc960.c @@ -17,7 +17,7 @@ #include #include -#include +#include "map.h" #include "cpu.h" /* define specific CPU platform device */ diff --git a/arch/arm/mach-w90x900/include/mach/regs-clock.h b/arch/arm/mach-w90x900/regs-clock.h similarity index 96% rename from arch/arm/mach-w90x900/include/mach/regs-clock.h rename to arch/arm/mach-w90x900/regs-clock.h index 516d6b477b61..345a6b51e823 100644 --- a/arch/arm/mach-w90x900/include/mach/regs-clock.h +++ b/arch/arm/mach-w90x900/regs-clock.h @@ -1,6 +1,4 @@ /* - * arch/arm/mach-w90x900/include/mach/regs-clock.h - * * Copyright (c) 2008 Nuvoton technology corporation. * * Wan ZongShun diff --git a/arch/arm/mach-w90x900/include/mach/regs-irq.h b/arch/arm/mach-w90x900/regs-irq.h similarity index 96% rename from arch/arm/mach-w90x900/include/mach/regs-irq.h rename to arch/arm/mach-w90x900/regs-irq.h index 8a3185fbc9cf..75d7ed1bbec2 100644 --- a/arch/arm/mach-w90x900/include/mach/regs-irq.h +++ b/arch/arm/mach-w90x900/regs-irq.h @@ -1,6 +1,4 @@ /* - * arch/arm/mach-w90x900/include/mach/regs-irq.h - * * Copyright (c) 2008 Nuvoton technology corporation * All rights reserved. * diff --git a/arch/arm/mach-w90x900/include/mach/regs-serial.h b/arch/arm/mach-w90x900/regs-serial.h similarity index 96% rename from arch/arm/mach-w90x900/include/mach/regs-serial.h rename to arch/arm/mach-w90x900/regs-serial.h index f08fa0d75e11..9cfeacd90aec 100644 --- a/arch/arm/mach-w90x900/include/mach/regs-serial.h +++ b/arch/arm/mach-w90x900/regs-serial.h @@ -1,6 +1,4 @@ /* - * arch/arm/mach-w90x900/include/mach/regs-serial.h - * * Copyright (c) 2008 Nuvoton technology corporation * All rights reserved. * diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c index cda085245e34..0129f5e92f3e 100644 --- a/arch/arm/mach-w90x900/time.c +++ b/arch/arm/mach-w90x900/time.c @@ -30,9 +30,8 @@ #include #include -#include +#include "map.h" #include "regs-timer.h" - #include "nuc9xx.h" #define RESETINT 0x1f From patchwork Thu Jul 14 11:11:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102018 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp20876qga; Thu, 14 Jul 2016 04:13:35 -0700 (PDT) X-Received: by 10.66.180.80 with SMTP id dm16mr19692999pac.47.1468494815219; Thu, 14 Jul 2016 04:13:35 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id sy10si2475888pab.259.2016.07.14.04.13.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 04:13:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ8-00079l-HB; Thu, 14 Jul 2016 11:12:26 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ2-00070U-HK for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 11:12:22 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MGV7M-1banh93eds-00DD10; Thu, 14 Jul 2016 13:11:51 +0200 From: Arnd Bergmann To: Wan Zongshun Subject: [PATCH 5/7] ARM: nuc900: move most of mach/irqs.h Date: Thu, 14 Jul 2016 13:11:33 +0200 Message-Id: <20160714111135.2476095-5-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160714111135.2476095-1-arnd@arndb.de> References: <20160714111135.2476095-1-arnd@arndb.de> X-Provags-ID: V03:K0:52SecZziMlxhGEELpx0PzgnmEhzxlnA42yf8jJ8QclqA9eGhhR5 4I9o2+Nmh41Y+pZ8Ty8ebNSNOkG+/Vl8R3GIPcX0mui7eaapmuVSlZJ3leBwyzExXPE+/Ly ISg+aRoouHud68h1CGLL1XjFD7SPC1SGWlNaYZyn44s/c3YMTMY1qvBU/NM27is+d5CJIeO CGI6VX6JOL3W8wDpPTzPQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Jtop+29SHts=:sKyNsThLh+D56jzuV0enZw hs0vzHIdfYr9qZdsgBKKkqbtXxUoWkpYKtPPRnHOG2rbgE6qxZ3FTjroCMrDgMVpWiO1zWDXH D7q1NyGGOnzFYUB154fACah1WOBgM5ULwKSWrx83TEWIgBVhlTAnwIyDVe04J+H6jZfX1nAWm fs8eRprn9RaGTPwlkcfMw+wqQ4vtGiO5ToWZmp5sjvYM8l9QYYbF2jR9NALaHWGIgNgaO525s u3zSVD1Dh9fUMEk4/Zz1Iug1/LE6I0fqlYmvNDN5AgvsbY54IRK/hKcrKvjIQw8YV+mdDcZLl gNjycxlCkwwXx7OS3zSPBKmUis3l5KOPn5rQomGrM6WnglPrfROmQGCibNKlyB9DGGEDkuhjz lBwWqACpSdeek7A4IQ3LBd7MULyKFR87eim46ZBHZbakiwoybquZj5MaT+2mtJYHWUYj6xgfZ fmI6nsoEIQoFgjEcuThYwaplsS3vZO2N7HEXev4Q2l6PH0ZkTgdvYVNHAo9yFfMugZGEG7RCj 669gFLwRd3eRZgREDbc3sq3YGqHv/DliVCiElxEuNzGvS8RGQputQdq+7kPDEhqAam9u84oqu 9c5lqzEBk6D2JgV+YZ/HwBNf3/DIF4q7a+Oj6tp5K4QcnUfCTfvPTN/Hd7DIUeJ+rbU77JzgV Ps15NG9+pP78/f8O0kzor9e70peu/w/xxTsE1oVFEyw2isy5u2Z3ijjE69WGb/mkIToE= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_041220_948262_120A6C88 X-CRM114-Status: GOOD ( 17.49 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.187 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.187 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Wan Zongshun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The interrupt definitions are not used anywhere in driver code, so we can keep them private to the machine directory. However, as long as we don't set SPARSE_IRQ, we need a header in the old place that defines NR_IRQS. Signed-off-by: Arnd Bergmann --- arch/arm/mach-w90x900/cpu.c | 1 + arch/arm/mach-w90x900/dev.c | 1 + arch/arm/mach-w90x900/include/mach/irqs.h | 86 ------------------------------- arch/arm/mach-w90x900/irq.c | 1 + arch/arm/mach-w90x900/irq.h | 85 ++++++++++++++++++++++++++++++ arch/arm/mach-w90x900/time.c | 1 + 6 files changed, 89 insertions(+), 86 deletions(-) create mode 100644 arch/arm/mach-w90x900/irq.h -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index d96d0e3eb7a6..7a9bbc75ad9b 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c @@ -30,6 +30,7 @@ #include #include +#include "irq.h" #include "map.h" #include "regs-serial.h" #include "regs-clock.h" diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index f9f3aa46b1af..027062b38626 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c @@ -38,6 +38,7 @@ #include #include +#include "irq.h" #include "map.h" #include "cpu.h" diff --git a/arch/arm/mach-w90x900/include/mach/irqs.h b/arch/arm/mach-w90x900/include/mach/irqs.h index 3b035c6e8c6f..277903857030 100644 --- a/arch/arm/mach-w90x900/include/mach/irqs.h +++ b/arch/arm/mach-w90x900/include/mach/irqs.h @@ -1,91 +1,5 @@ -/* - * arch/arm/mach-w90x900/include/mach/irqs.h - * - * Copyright (c) 2008 Nuvoton technology corporation. - * - * Wan ZongShun - * - * Based on arch/arm/mach-s3c2410/include/mach/irqs.h - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation;version 2 of the License. - * - */ - -#ifndef __ASM_ARCH_IRQS_H -#define __ASM_ARCH_IRQS_H - -/* - * we keep the first set of CPU IRQs out of the range of - * the ISA space, so that the PC104 has them to itself - * and we don't end up having to do horrible things to the - * standard ISA drivers.... - * - */ - -#define W90X900_IRQ(x) (x) - -/* Main cpu interrupts */ - -#define IRQ_WDT W90X900_IRQ(1) -#define IRQ_GROUP0 W90X900_IRQ(2) -#define IRQ_GROUP1 W90X900_IRQ(3) -#define IRQ_ACTL W90X900_IRQ(4) -#define IRQ_LCD W90X900_IRQ(5) -#define IRQ_RTC W90X900_IRQ(6) -#define IRQ_UART0 W90X900_IRQ(7) -#define IRQ_UART1 W90X900_IRQ(8) -#define IRQ_UART2 W90X900_IRQ(9) -#define IRQ_UART3 W90X900_IRQ(10) -#define IRQ_UART4 W90X900_IRQ(11) -#define IRQ_TIMER0 W90X900_IRQ(12) -#define IRQ_TIMER1 W90X900_IRQ(13) -#define IRQ_T_INT_GROUP W90X900_IRQ(14) -#define IRQ_USBH W90X900_IRQ(15) -#define IRQ_EMCTX W90X900_IRQ(16) -#define IRQ_EMCRX W90X900_IRQ(17) -#define IRQ_GDMAGROUP W90X900_IRQ(18) -#define IRQ_DMAC W90X900_IRQ(19) -#define IRQ_FMI W90X900_IRQ(20) -#define IRQ_USBD W90X900_IRQ(21) -#define IRQ_ATAPI W90X900_IRQ(22) -#define IRQ_G2D W90X900_IRQ(23) -#define IRQ_PCI W90X900_IRQ(24) -#define IRQ_SCGROUP W90X900_IRQ(25) -#define IRQ_I2CGROUP W90X900_IRQ(26) -#define IRQ_SSP W90X900_IRQ(27) -#define IRQ_PWM W90X900_IRQ(28) -#define IRQ_KPI W90X900_IRQ(29) -#define IRQ_P2SGROUP W90X900_IRQ(30) -#define IRQ_ADC W90X900_IRQ(31) - #if !defined(CONFIG_SOC_NUC900) #define NR_IRQS (IRQ_ADC+1) #else #define NR_IRQS 62 #endif - -/*for irq group*/ - -#define IRQ_PS2_PORT0 0x10000000 -#define IRQ_PS2_PORT1 0x20000000 -#define IRQ_I2C_LINE0 0x04000000 -#define IRQ_I2C_LINE1 0x08000000 -#define IRQ_SC_CARD0 0x01000000 -#define IRQ_SC_CARD1 0x02000000 -#define IRQ_GDMA_CH0 0x00100000 -#define IRQ_GDMA_CH1 0x00200000 -#define IRQ_TIMER2 0x00010000 -#define IRQ_TIMER3 0x00020000 -#define IRQ_TIMER4 0x00040000 -#define IRQ_GROUP0_IRQ0 0x00000001 -#define IRQ_GROUP0_IRQ1 0x00000002 -#define IRQ_GROUP0_IRQ2 0x00000004 -#define IRQ_GROUP0_IRQ3 0x00000008 -#define IRQ_GROUP1_IRQ4 0x00000010 -#define IRQ_GROUP1_IRQ5 0x00000020 -#define IRQ_GROUP1_IRQ6 0x00000040 -#define IRQ_GROUP1_IRQ7 0x00000080 - -#endif /* __ASM_ARCH_IRQ_H */ diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c index 2a6fe35b76e7..42d9af897c42 100644 --- a/arch/arm/mach-w90x900/irq.c +++ b/arch/arm/mach-w90x900/irq.c @@ -26,6 +26,7 @@ #include #include +#include "irq.h" #include "map.h" #include "regs-irq.h" #include "nuc9xx.h" diff --git a/arch/arm/mach-w90x900/irq.h b/arch/arm/mach-w90x900/irq.h new file mode 100644 index 000000000000..9dc88bb62692 --- /dev/null +++ b/arch/arm/mach-w90x900/irq.h @@ -0,0 +1,85 @@ +/* + * arch/arm/mach-w90x900/include/mach/irqs.h + * + * Copyright (c) 2008 Nuvoton technology corporation. + * + * Wan ZongShun + * + * Based on arch/arm/mach-s3c2410/include/mach/irqs.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation;version 2 of the License. + * + */ + +#ifndef __ASM_ARCH_IRQS_H +#define __ASM_ARCH_IRQS_H + +/* + * we keep the first set of CPU IRQs out of the range of + * the ISA space, so that the PC104 has them to itself + * and we don't end up having to do horrible things to the + * standard ISA drivers.... + * + */ + +#define W90X900_IRQ(x) (x) + +/* Main cpu interrupts */ + +#define IRQ_WDT W90X900_IRQ(1) +#define IRQ_GROUP0 W90X900_IRQ(2) +#define IRQ_GROUP1 W90X900_IRQ(3) +#define IRQ_ACTL W90X900_IRQ(4) +#define IRQ_LCD W90X900_IRQ(5) +#define IRQ_RTC W90X900_IRQ(6) +#define IRQ_UART0 W90X900_IRQ(7) +#define IRQ_UART1 W90X900_IRQ(8) +#define IRQ_UART2 W90X900_IRQ(9) +#define IRQ_UART3 W90X900_IRQ(10) +#define IRQ_UART4 W90X900_IRQ(11) +#define IRQ_TIMER0 W90X900_IRQ(12) +#define IRQ_TIMER1 W90X900_IRQ(13) +#define IRQ_T_INT_GROUP W90X900_IRQ(14) +#define IRQ_USBH W90X900_IRQ(15) +#define IRQ_EMCTX W90X900_IRQ(16) +#define IRQ_EMCRX W90X900_IRQ(17) +#define IRQ_GDMAGROUP W90X900_IRQ(18) +#define IRQ_DMAC W90X900_IRQ(19) +#define IRQ_FMI W90X900_IRQ(20) +#define IRQ_USBD W90X900_IRQ(21) +#define IRQ_ATAPI W90X900_IRQ(22) +#define IRQ_G2D W90X900_IRQ(23) +#define IRQ_PCI W90X900_IRQ(24) +#define IRQ_SCGROUP W90X900_IRQ(25) +#define IRQ_I2CGROUP W90X900_IRQ(26) +#define IRQ_SSP W90X900_IRQ(27) +#define IRQ_PWM W90X900_IRQ(28) +#define IRQ_KPI W90X900_IRQ(29) +#define IRQ_P2SGROUP W90X900_IRQ(30) +#define IRQ_ADC W90X900_IRQ(31) + +/*for irq group*/ + +#define IRQ_PS2_PORT0 0x10000000 +#define IRQ_PS2_PORT1 0x20000000 +#define IRQ_I2C_LINE0 0x04000000 +#define IRQ_I2C_LINE1 0x08000000 +#define IRQ_SC_CARD0 0x01000000 +#define IRQ_SC_CARD1 0x02000000 +#define IRQ_GDMA_CH0 0x00100000 +#define IRQ_GDMA_CH1 0x00200000 +#define IRQ_TIMER2 0x00010000 +#define IRQ_TIMER3 0x00020000 +#define IRQ_TIMER4 0x00040000 +#define IRQ_GROUP0_IRQ0 0x00000001 +#define IRQ_GROUP0_IRQ1 0x00000002 +#define IRQ_GROUP0_IRQ2 0x00000004 +#define IRQ_GROUP0_IRQ3 0x00000008 +#define IRQ_GROUP1_IRQ4 0x00000010 +#define IRQ_GROUP1_IRQ5 0x00000020 +#define IRQ_GROUP1_IRQ6 0x00000040 +#define IRQ_GROUP1_IRQ7 0x00000080 + +#endif /* __ASM_ARCH_IRQ_H */ diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c index 0129f5e92f3e..cb45df22ce2c 100644 --- a/arch/arm/mach-w90x900/time.c +++ b/arch/arm/mach-w90x900/time.c @@ -30,6 +30,7 @@ #include #include +#include "irq.h" #include "map.h" #include "regs-timer.h" #include "nuc9xx.h" From patchwork Thu Jul 14 11:11:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102014 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp21327qga; Thu, 14 Jul 2016 04:14:31 -0700 (PDT) X-Received: by 10.66.49.134 with SMTP id u6mr21872830pan.118.1468494871747; Thu, 14 Jul 2016 04:14:31 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id xg7si2495844pab.222.2016.07.14.04.14.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 04:14:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeaC-0007v5-8v; Thu, 14 Jul 2016 11:13:32 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ4-000713-Bm for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 11:12:25 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0Ls5U3-1bFAmN0FJP-013wvd; Thu, 14 Jul 2016 13:11:52 +0200 From: Arnd Bergmann To: Wan Zongshun Subject: [PATCH 6/7] ARM: nuc900: use SPARSE_IRQ Date: Thu, 14 Jul 2016 13:11:34 +0200 Message-Id: <20160714111135.2476095-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160714111135.2476095-1-arnd@arndb.de> References: <20160714111135.2476095-1-arnd@arndb.de> X-Provags-ID: V03:K0:JCTypzBxqFl1GsmFPS/t0e0f7OtN5nE1XhYv+df3r5M2GBxrWqP WQHUCKMwyOccR2oaaWPfvq0d7lzgcbLvLVKGH6J+DKOkvAkyJvzpBByGnDz5x9+/gYlA5Hr B8+/mptyRdH2ZwwUVLOXNVSBccm+qUJaqzsbl17fyFb7Y5HpT6esw1IAw9vrW/xpkbTJh31 Ms9lLE9LM+jkfY6HPK/qQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Bj4/BTrTo+k=:QOnLJG4LVuMKeDBBOVTbaB NklqzEGsqkRMz2QRk+rgUbrW6XOH61HiMWCa5KxL5r/iCrB82drGZd6jtxeDIwvu/Rhpt9ntJ SkK3FVfJC7S1mtDSMfilCZbhS360c9+wRqAKabbXOEY0GZ9so20l6qklzANVYrXsMw+xGESPt bp/IKjx4QPZAEtdEMXC749K+LglFTFuHPjx+OceniVOYPDjLra//9jXCWm0WmD27gUHUJGz0Q 3apaO2LLQrB4nop0UH/pMOiW4BtrwqMZ9xdEBdeRxB3iy+K82XGWi+XY7OylhINfWl21nPJaW Q7J7sC+ywS74mGtUG0CZFHSLCgRisfnETyc4KVkGjFeMUiQ3hyNC72fDYeh04l0IvvIM1NaCm aUzDAeuayrmV9iPi/AI1J/Fc6J1SVyE+lk2Em5lglvVDohQkfuyyMUqtiVVt+vzz+19aQZzlO BUcxmOG057eM9yZ3Ng7idpVDYWNPu3TQa0vro/NpPqwAze2rUCPb9olrCNoQuUUw6Us6mYs6Q T5rYHYYgaiRd7hL909U2ui7MoKt18MxpqlenYXM6iSxlK7JXU7ofr9NA/MYpugAkmpnlo6A6i 68Xvb8gC3Gs3tzcuA2ArgXBIEj6QrRFPmRsDtv46RCEd4rXWDetUWlsYGv0PsW+f5X3UJv6JW HazRcYSA1zTY+YAVhiNde88oqFeGieIchP2n99slE6m3qY3oRxVFP+O0coof0DfiRb4s= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_041222_903729_295D4316 X-CRM114-Status: GOOD ( 15.28 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.134 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.134 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Wan Zongshun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org ARCH_MULTIPLATFORM implies sparse IRQs, so in we first have to make sure that actually works. This enables CONFIG_SPARSE_IRQ for all of mach-w90x900. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 1 + arch/arm/mach-w90x900/include/mach/irqs.h | 5 ----- arch/arm/mach-w90x900/irq.c | 22 +++++++++++++++++++++- drivers/irqchip/irq-nuc900.c | 2 +- 4 files changed, 23 insertions(+), 7 deletions(-) delete mode 100644 arch/arm/mach-w90x900/include/mach/irqs.h -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 908694886088..160dbf993660 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -504,6 +504,7 @@ config ARCH_W90X900 select GENERIC_CLOCKEVENTS select GPIOLIB select MULTI_IRQ_HANDLER + select SPARSE_IRQ help Support for Nuvoton (Winbond logic dept.) ARM9 processor, At present, the w90x900 has been renamed nuc900, regarding diff --git a/arch/arm/mach-w90x900/include/mach/irqs.h b/arch/arm/mach-w90x900/include/mach/irqs.h deleted file mode 100644 index 277903857030..000000000000 --- a/arch/arm/mach-w90x900/include/mach/irqs.h +++ /dev/null @@ -1,5 +0,0 @@ -#if !defined(CONFIG_SOC_NUC900) -#define NR_IRQS (IRQ_ADC+1) -#else -#define NR_IRQS 62 -#endif diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c index 42d9af897c42..726f646c992b 100644 --- a/arch/arm/mach-w90x900/irq.c +++ b/arch/arm/mach-w90x900/irq.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -203,6 +204,8 @@ static struct irq_chip nuc900_irq_chip = { .irq_unmask = nuc900_irq_unmask, }; +static struct irq_domain *aic_domain; + static void __exception_irq_entry nuc900_handle_irq(struct pt_regs *regs) { int hwirq; @@ -210,15 +213,32 @@ static void __exception_irq_entry nuc900_handle_irq(struct pt_regs *regs) (void)readl(REG_AIC_IPER); hwirq = readl(REG_AIC_ISNR); - handle_IRQ(hwirq, regs); + handle_domain_irq(aic_domain, hwirq, regs); } +static int aic_irq_domain_map(struct irq_domain *d, unsigned int virq, + irq_hw_number_t hw) +{ + irq_set_chip_and_handler(virq, &nuc900_irq_chip, handle_level_irq); + irq_clear_status_flags(virq, IRQ_NOREQUEST); + + return 0; +} + +static struct irq_domain_ops aic_irq_domain_ops = { + .map = aic_irq_domain_map, + .xlate = irq_domain_xlate_onecell, +}; + void __init nuc900_init_irq(void) { int irqno; set_handle_irq(nuc900_handle_irq); + aic_domain = irq_domain_add_simple(NULL, 31, 1, + &aic_irq_domain_ops, NULL); + __raw_writel(0xFFFFFFFE, REG_AIC_MDCR); for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) { diff --git a/drivers/irqchip/irq-nuc900.c b/drivers/irqchip/irq-nuc900.c index c4b2e39f7662..a595139f2f9c 100644 --- a/drivers/irqchip/irq-nuc900.c +++ b/drivers/irqchip/irq-nuc900.c @@ -129,7 +129,7 @@ static int __init aic_of_init(struct device_node *node, writel(0xFFFFFFFC, aic_base + REG_AIC_MDCR); writel(0xFFFFFFFF, aic_base + REG_AIC_MDCRH); - aic_domain = irq_domain_add_linear(node, NR_IRQS, + aic_domain = irq_domain_add_linear(node, 64, &aic_irq_domain_ops, NULL); if (!aic_domain) { From patchwork Thu Jul 14 11:11:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102012 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp21832qga; Thu, 14 Jul 2016 04:15:37 -0700 (PDT) X-Received: by 10.66.77.194 with SMTP id u2mr21725855paw.90.1468494937889; Thu, 14 Jul 2016 04:15:37 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 77si4076264pft.11.2016.07.14.04.15.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jul 2016 04:15:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeb4-0000IU-Ii; Thu, 14 Jul 2016 11:14:26 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bNeZ3-00070v-Kg for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2016 11:12:27 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LjOHr-1aosVD12ZL-00dW5t; Thu, 14 Jul 2016 13:11:52 +0200 From: Arnd Bergmann To: Wan Zongshun Subject: [PATCH 7/7] ARM: nuc900: make NUC970 multiplatform Date: Thu, 14 Jul 2016 13:11:35 +0200 Message-Id: <20160714111135.2476095-7-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160714111135.2476095-1-arnd@arndb.de> References: <20160714111135.2476095-1-arnd@arndb.de> X-Provags-ID: V03:K0:NuIaAolkjhENz3E8/cSonMiY0Ir37RAtfZ7tjVfyx/06xhSNbIY 2yinh6RWfFFM26EOurp4IIUpzjcL0S2i4Ntgv+DxQ5PwOxXOv+/9lEUacWfCwd0dWtwVq9a SQlagA0GJ70cKaMeLc5ZOMW/xR3cCWB+586sd720YIfX4Vc1CQ/rA2TcLBfLPOkfqWEWSa8 ss7ceCvQ6KmikFpA+o0Bw== X-UI-Out-Filterresults: notjunk:1; V01:K0:oSqJ8WhXarU=:Xef2qcHlEbeoy2ARDvux5z gQDmUFxcGu5h1K1FicMqfGRnVg4aohjycDtCmzfRQUjDduyred6qaAO20+GMzjKHDZ9e297mp TR68pTSH/aIFnOlOu/PE6EsEWyaDSXhGlEfNE2IfAMD7RBu7lsBKJvRzvOVH4V4SVKlgKFH7d Lj1DQHD8s0e3onMfWVZeHeUfDv7NFGwm9x8sIMT1tW2Gq6oyIvotk4+VYa40aoxsmRhsGsjam wt0iMlEIuqnYVIW4oDfimiKohzEljchdnpWHM37cxHSbpvVKTtQA18NxOjkxkr/IE51kP3JIM XCTLbjoSqPznoqVH85SLnL01JzdMVV2fDG8MsJfQTY6dMNyOVzzv4natfzJyb8uKrcQrUzJkJ EtI3oPSpKLe+KqNgco6fRzl5lWDDJ5o5sT2Sp74+LYJBU/Z4qVAiUUN0kZ7YbyUY/878+f0n3 4YzYmC/+j6xZvxoO5jlNFvn42YL2QIsFCE0aDMEPd7d1J7lGQNifBeVj0PfBvnp2sNXin4iBb dsfKMdewaWxx59h32zfwsu80zbJgeGB2OvwOPVGoyL5ZoyiNK1v6reNvzh+KpJ4WHi8SbU2Dg 9DpslDbyZKAJzDeXebbXd9TeQI8zegNzv3SVu6aGV2zHRXBvuBpesthMgBRBpXkWNKtKxCGr1 Qp6wK6Cvv8fKjFNT70w0tOg23cZfd2FknS5g9QKYKTOYSHNY5OjkLK/MpTZ6pawS1eEU= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160714_041222_124760_DE9961BF X-CRM114-Status: GOOD ( 14.51 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.133 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.133 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Wan Zongshun , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This enables multiplatform support for NUC9xx, which should work fine for NUC970, though the others are still lacking a common-clk driver to actually work. As a consequence, I'm leaving both options present -- separate builds using ARCH_W90X900_SINGLE and a multiplatform build using the new ARCH_NUC900 option. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 2 +- arch/arm/configs/nuc910_defconfig | 2 +- arch/arm/configs/nuc950_defconfig | 2 +- arch/arm/configs/nuc960_defconfig | 2 +- arch/arm/configs/nuc970_defconfig | 4 +++- arch/arm/mach-w90x900/Kconfig | 41 +++++++++++++++++++++++++-------------- arch/arm/mach-w90x900/Makefile | 8 +++++--- arch/arm/mach-w90x900/cpu.c | 6 ++++++ arch/arm/mach-w90x900/cpu.h | 4 ++++ 9 files changed, 48 insertions(+), 23 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 160dbf993660..2a3113bd437a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -496,7 +496,7 @@ config ARCH_KS8695 Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based System-on-Chip devices. -config ARCH_W90X900 +config ARCH_W90X900_SINGLE bool "Nuvoton W90X900 CPU" select CLKDEV_LOOKUP select CLKSRC_MMIO diff --git a/arch/arm/configs/nuc910_defconfig b/arch/arm/configs/nuc910_defconfig index 10180cfde162..bb229dab9d72 100644 --- a/arch/arm/configs/nuc910_defconfig +++ b/arch/arm/configs/nuc910_defconfig @@ -8,7 +8,7 @@ CONFIG_USER_NS=y CONFIG_BLK_DEV_INITRD=y CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_SLAB=y -CONFIG_ARCH_W90X900=y +CONFIG_ARCH_W90X900_SINGLE=y CONFIG_PREEMPT=y CONFIG_AEABI=y CONFIG_CMDLINE="root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M" diff --git a/arch/arm/configs/nuc950_defconfig b/arch/arm/configs/nuc950_defconfig index 27aa8731330b..b3b43f0f2238 100644 --- a/arch/arm/configs/nuc950_defconfig +++ b/arch/arm/configs/nuc950_defconfig @@ -8,7 +8,7 @@ CONFIG_USER_NS=y CONFIG_BLK_DEV_INITRD=y CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_SLAB=y -CONFIG_ARCH_W90X900=y +CONFIG_ARCH_W90X900_SINGLE=y # CONFIG_MACH_W90P910EVB is not set CONFIG_MACH_W90P950EVB=y CONFIG_NO_HZ=y diff --git a/arch/arm/configs/nuc960_defconfig b/arch/arm/configs/nuc960_defconfig index 56fd7ad0ff13..4c6b0315a49b 100644 --- a/arch/arm/configs/nuc960_defconfig +++ b/arch/arm/configs/nuc960_defconfig @@ -8,7 +8,7 @@ CONFIG_USER_NS=y CONFIG_BLK_DEV_INITRD=y CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_SLAB=y -CONFIG_ARCH_W90X900=y +CONFIG_ARCH_W90X900_SINGLE=y # CONFIG_MACH_W90P910EVB is not set CONFIG_MACH_W90N960EVB=y CONFIG_NO_HZ=y diff --git a/arch/arm/configs/nuc970_defconfig b/arch/arm/configs/nuc970_defconfig index b39a406c6495..972e3286eaf8 100644 --- a/arch/arm/configs/nuc970_defconfig +++ b/arch/arm/configs/nuc970_defconfig @@ -19,7 +19,9 @@ CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y -CONFIG_ARCH_W90X900=y +CONFIG_ARCH_MULTIPLATFORM=y +CONFIG_ARCH_MULTI_V5=y +# CONFIG_ARCH_MULTI_V7 is not set CONFIG_SOC_NUC970=y # CONFIG_MACH_W90P910EVB is not set CONFIG_PREEMPT=y diff --git a/arch/arm/mach-w90x900/Kconfig b/arch/arm/mach-w90x900/Kconfig index 56f19aac6dab..3cfb29fc2abe 100644 --- a/arch/arm/mach-w90x900/Kconfig +++ b/arch/arm/mach-w90x900/Kconfig @@ -1,22 +1,12 @@ -if ARCH_W90X900 +menuconfig ARCH_NUC900 + bool "Nuvoton CPU_W90P910/NUC9xx support" + depends on ARCH_MULTI_V5 -config CPU_W90P910 - bool - help - Support for W90P910 of Nuvoton W90X900 CPUs. - -config CPU_NUC950 - bool - help - Support for NUCP950 of Nuvoton NUC900 CPUs. - -config CPU_NUC960 - bool - help - Support for NUCP960 of Nuvoton NUC900 CPUs. +if ARCH_NUC900 || ARCH_W90X900_SINGLE config SOC_NUC970 bool "Nuvoton NUC970 SoC support" + select ARCH_W90X900 select COMMON_CLK select GENERIC_IRQ_CHIP select HAVE_CLK_PREPARE @@ -35,6 +25,27 @@ config SOC_NUC970 https://github.com/zswan/nuc900-document/blob/master/ NUC970_TechnicalReferenceManual_EN_Rev1.30.pdf +config ARCH_W90X900 + def_bool ARCH_W90X900_SINGLE || ARCH_NUC900 + +config CPU_W90P910 + bool + select ARCH_W90X900 + help + Support for W90P910 of Nuvoton W90X900 CPUs. + +config CPU_NUC950 + bool + select ARCH_W90X900 + help + Support for NUCP950 of Nuvoton NUC900 CPUs. + +config CPU_NUC960 + bool + select ARCH_W90X900 + help + Support for NUCP960 of Nuvoton NUC900 CPUs. + menu "W90P910 Machines" config MACH_W90P910EVB diff --git a/arch/arm/mach-w90x900/Makefile b/arch/arm/mach-w90x900/Makefile index d13ba5adb74b..f93996785494 100644 --- a/arch/arm/mach-w90x900/Makefile +++ b/arch/arm/mach-w90x900/Makefile @@ -4,10 +4,12 @@ # Object file lists. -ifeq ($(CONFIG_SOC_NUC970),) -obj-y := irq.o time.o mfp.o gpio.o clock.o -obj-y += clksel.o dev.o cpu.o +obj-y += mfp.o irq.o time.o gpio.o dev.o cpu.o + +ifndef CONFIG_COMMON_CLK +obj-y += clksel.o clock.o endif + # W90X900 CPU support files obj-$(CONFIG_CPU_W90P910) += nuc910.o diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 7a9bbc75ad9b..1bc92485eca5 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c @@ -52,6 +52,7 @@ static struct map_desc nuc900_iodesc[] __initdata = { IODESC_ENT(GPIO), }; +#ifndef CONFIG_COMMON_CLK /* Initial clock declarations. */ static DEFINE_CLK(lcd, 0); static DEFINE_CLK(audio, 1); @@ -106,6 +107,7 @@ static struct clk_lookup nuc900_clkregs[] = { DEF_CLKLOOK(&clk_timer3, NULL, "timer3"), DEF_CLKLOOK(&clk_timer4, NULL, "timer4"), }; +#endif /* Initial serial platform data */ @@ -122,6 +124,7 @@ struct platform_device nuc900_serial_device = { }, }; +#ifndef CONFIG_COMMON_CLK /*Set NUC900 series cpu frequence*/ static int __init nuc900_set_clkval(unsigned int cpufreq) { @@ -199,6 +202,7 @@ static int __init nuc900_set_cpufreq(char *str) } __setup("cpufreq=", nuc900_set_cpufreq); +#endif /*Init NUC900 evb io*/ @@ -222,10 +226,12 @@ void __init nuc900_map_io(struct map_desc *mach_desc, int mach_size) /*Init NUC900 clock*/ +#ifndef CONFIG_COMMON_CLK void __init nuc900_init_clocks(void) { clkdev_add_table(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs)); } +#endif #define WTCR (TMR_BA + 0x1C) #define WTCLK (1 << 10) diff --git a/arch/arm/mach-w90x900/cpu.h b/arch/arm/mach-w90x900/cpu.h index f8730b60bd76..407f5edd8af6 100644 --- a/arch/arm/mach-w90x900/cpu.h +++ b/arch/arm/mach-w90x900/cpu.h @@ -46,7 +46,11 @@ /* extern file from cpu.c */ extern void nuc900_clock_source(struct device *dev, unsigned char *src); +#ifdef CONFIG_COMMON_CLK +static inline void nuc900_init_clocks(void) {} +#else extern void nuc900_init_clocks(void); +#endif extern void nuc900_map_io(struct map_desc *mach_desc, int mach_size); extern void nuc900_board_init(struct platform_device **device, int size);