From patchwork Fri Aug 9 16:33: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: 170959 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10236590ile; Fri, 9 Aug 2019 09:34:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFhoIvzjMIgGXpokhSVihcNdyOp0hge0+Jj52+2gLiqONjcjXGIr2Y9dwC1N41LQ3oc5o9 X-Received: by 2002:a17:902:a712:: with SMTP id w18mr12569724plq.274.1565368442316; Fri, 09 Aug 2019 09:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565368442; cv=none; d=google.com; s=arc-20160816; b=xG1pbVX4T10FjQ5oBA7E9i6EML9xWlSFbKsOwM7470TFv9HvaYG89Nna8CsfLBKHJC USAZDrwTqtGQVWYAbZsFj8bzytKSkA9IcBKPeslK3AEOrBjnnNIZucVuqCmkPL2vyT0B QettkobswNxa3sx47aopCl0/KSvPBaET+dbCvezYJ2Tk5hyn47v85345JwBpozeoboE7 s/4VWrC6lngQ7DmwswKYmnGQyGXxmSqGloz6HDbTNTzaCs6vTUKw9SeVbf06S2Pk7px4 W6kO5bm/vO9yPSAxQJu+ybQDp1eUCeNZFzsWNgvpmtpaqGI+2Qgl0jS4rRIe8YFnG1sU Ajew== 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=hqbZrt+/GBJaVFud82CXSB+QHNyLNoEvs9bu1P81nN8=; b=A8sL52NMS51jrycXTRaBF/n0a+X0atTS1G20vd3Vei+FAUv0eyQFaqpDjRjDSatAIX 0KfPnQj0E/VpDx95JTRJC9WqYrv83aVLNgKtL2MHxn1JuEg6sdua9lgLPw2DuYWun8f9 X3d3WQibI7q97RLa7/KuDRFsRvc1GTmHJhEfKiIzJnZuf5qEdheoof861OVj9bUM6L8b MXeRgDv5UlzTCTA27p6oh1f5wdVqlE2SgtRVdtmU2kRx4zgi+1Q9KLO011v0luGCymyc gE5EIgm0DtUoCRF8H3B/eKir9DI8701b7R82b/fk0JQZszyr9XYn+lMpG+IXbF+2oU5G zxYw== 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 cl14si25178855plb.341.2019.08.09.09.34.01; Fri, 09 Aug 2019 09:34:02 -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 S2437180AbfHIQeB (ORCPT + 28 others); Fri, 9 Aug 2019 12:34:01 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:43109 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407445AbfHIQd6 (ORCPT ); Fri, 9 Aug 2019 12:33:58 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MwQGj-1iCHo22V1R-00sLsu; Fri, 09 Aug 2019 18:33:43 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Arnd Bergmann , Russell King , Dan Williams , Vinod Koul , Linus Walleij , Bartosz Golaszewski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org Subject: [PATCH 3/7] dma: iop-adma: use correct printk format strings Date: Fri, 9 Aug 2019 18:33:17 +0200 Message-Id: <20190809163334.489360-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809163334.489360-1-arnd@arndb.de> References: <20190809162956.488941-1-arnd@arndb.de> <20190809163334.489360-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:K2Gx1fY8Ljd2NDS0Jw6+u8SOqS2PIq6MXC+1tPMpqkPHMkN2W/I iUBsOGMIfYW0btXkuSVHgws6TSChnnyEjdPzKqoXg730XHuYfskdrup3mtEge1rLJ+RCNvQ GQbLW5G77AESmvtOHKekKJvRWjugWQADMHgElxGI6TZPj1M/u2a4Z8vgEVUsbkqZx9E69wR Q+AKv4g8mPLpqgrMovg+g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:QlJroodNYQw=:7aGy8w9I7kaBCshH9xaCjU wXcGD7f/tjxfwmYWN0zF6a6BNWSScNC/Is7ufjpFaHt2cDsuBKoX3K3cuXluPLwW6I3Qisz3m U+42mPjMLyNFXswlSWWkloOyq+wzFchxwUWpSBj7/RUTP4lyyyI371+rz3Wc3bFpy8G1XkncX LoovGzApYsKtu1YPo1rEDONjs4MydfqiVD6Wg32W2qIqY5K8vWcPuJBEK5Cb+0/efGgbsNQV7 V3wOvTjX70IxhULQLgAOMt2Bb4YJgU1rztLd+tOvjMRSAFBjDz/Zd7yLOvgx8lGvyRcQFrSh4 rWTbIxgkc8UNl+eNyAsDeUi8uOphzhhXMi9NhAm9eGpMfZ+X2VEEkWvst5wPCoK2BkgLtu9iX pz3uTyHAQmgP78WyaeDMfD2uTJdp0eqjnxj/uy9YlSZm8RVQqeM99+n9825SzW0xxl+GQvu0N UwMPpWclDbP+vbdalZWzI5/8G+R2l5XV7wknLNi/L47H7ak53NkcdoXB+EbsO9mVne++T9wmn dcjnvVDeJ9qTx7yl7+w4dLPEtykr+QZ2wNwJ3vCqyKeDwFVkNcGJjk36HA7Zigxn8acuLL603 M5dXoM+K4YhwfCd74Vhb5K7ND0GQ5kYbSogwdlOihfCjtVVqF51qXlKOnxfj02+v7s2e/sDsR pgZ94SPPF4hfRTom/6Acj8gyvdZq2e569om+DLW6j7bdszTGSgVGdr3oT+fRdUmHuG0RJ3tWd 18Cx/AYE/Vj++D0bSBIgCfsEps3UlwrZw+gGjg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When compile-testing on other architectures, we get lots of warnings about incorrect format strings, like: drivers/dma/iop-adma.c: In function 'iop_adma_alloc_slots': drivers/dma/iop-adma.c:307:6: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] drivers/dma/iop-adma.c: In function 'iop_adma_prep_dma_memcpy': >> drivers/dma/iop-adma.c:518:40: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=] Use %zu for printing size_t as required, and cast the dma_addr_t arguments to 'u64' for printing with %llx. Ideally this should use the %pad format string, but that requires an lvalue argument that doesn't work here. Signed-off-by: Arnd Bergmann --- drivers/dma/iop-adma.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.20.0 diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 7857b54770d1..aebdd671651a 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -117,9 +117,9 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan) list_for_each_entry_safe(iter, _iter, &iop_chan->chain, chain_node) { pr_debug("\tcookie: %d slot: %d busy: %d " - "this_desc: %#x next_desc: %#x ack: %d\n", + "this_desc: %#x next_desc: %#llx ack: %d\n", iter->async_tx.cookie, iter->idx, busy, - iter->async_tx.phys, iop_desc_get_next_desc(iter), + iter->async_tx.phys, (u64)iop_desc_get_next_desc(iter), async_tx_test_ack(&iter->async_tx)); prefetch(_iter); prefetch(&_iter->async_tx); @@ -307,9 +307,9 @@ iop_adma_alloc_slots(struct iop_adma_chan *iop_chan, int num_slots, int i; dev_dbg(iop_chan->device->common.dev, "allocated slot: %d " - "(desc %p phys: %#x) slots_per_op %d\n", + "(desc %p phys: %#llx) slots_per_op %d\n", iter->idx, iter->hw_desc, - iter->async_tx.phys, slots_per_op); + (u64)iter->async_tx.phys, slots_per_op); /* pre-ack all but the last descriptor */ if (num_slots != slots_per_op) @@ -517,7 +517,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest, return NULL; BUG_ON(len > IOP_ADMA_MAX_BYTE_COUNT); - dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s len: %zu\n", __func__, len); spin_lock_bh(&iop_chan->lock); @@ -550,7 +550,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest, BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); dev_dbg(iop_chan->device->common.dev, - "%s src_cnt: %d len: %u flags: %lx\n", + "%s src_cnt: %d len: %zu flags: %lx\n", __func__, src_cnt, len, flags); spin_lock_bh(&iop_chan->lock); @@ -583,7 +583,7 @@ iop_adma_prep_dma_xor_val(struct dma_chan *chan, dma_addr_t *dma_src, if (unlikely(!len)) return NULL; - dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n", __func__, src_cnt, len); spin_lock_bh(&iop_chan->lock); @@ -621,7 +621,7 @@ iop_adma_prep_dma_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src, BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); dev_dbg(iop_chan->device->common.dev, - "%s src_cnt: %d len: %u flags: %lx\n", + "%s src_cnt: %d len: %zu flags: %lx\n", __func__, src_cnt, len, flags); if (dmaf_p_disabled_continue(flags)) @@ -684,7 +684,7 @@ iop_adma_prep_dma_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src, return NULL; BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); - dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n", __func__, src_cnt, len); spin_lock_bh(&iop_chan->lock); From patchwork Fri Aug 9 16:33: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: 170961 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10236684ile; Fri, 9 Aug 2019 09:34:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqxhqkwqVNudRKxLGgBz/pXkIT5sfVLNGmu/cEGDVzEL9egFwPHcszxGqmJH5Qu4dB/FIu X-Received: by 2002:a17:90a:c588:: with SMTP id l8mr10256448pjt.16.1565368446738; Fri, 09 Aug 2019 09:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565368446; cv=none; d=google.com; s=arc-20160816; b=xh1M0jX7aR5MuMfI3hP838hy2Abb2mAKcT9qPdr1nDxKGhzdFJJ0zvlNb9nXdxD8Fq yvGf3os+xK6770VZRw0acy0IwlHttG+l1ypvUywBC4l+Dt70wR7+In2+wTCuVVOoesX5 v97Ql8nRBQvDL0BOSP1OixyqAAB0/x5bwQhAPY4SGCisz01qhLgA2ctI9THmxtTGKNMy QrWqcUY2JEGnsrg8RI46qPuKi0i7GyBg6mEQAMOfpiCnlJPPqv14lY46smYmjkexmNkb hMDkur2HbnwEAeQdWqx/tSoTdl2jIgMZalrzhiYTyj4hnlQ5wqkLmpG11MrjcEprm+Ph VQfw== 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=RIyg64kxF+yRirWuX4qH8/RZg/x1kpZ8zZDjpjp2G08=; b=syjVkaYFt/l0XrxalF3SzOdIlpFhj3uhLl6TEbsBIF4xyqAI+ANL5bU74Rz0wmh6WV 323xNSUNy2M7cmpfLi5N1zOeG7PMTnq1JdM2yNObTO7c/zxqaGqL1JwmOFdDCzLktvw+ AKgaIEpTpdqMtdec65j3nQYWbaNEAWGna4DpUbw/sXJcuI1zRb8GrpNY8peBZRtVJh8h PYOsivzQO2aZyNc5/FHV4QHYDPzt74tD63Jg0mX9hU3ZW06ha2rGkkErPBrLZ5tuS4Aa i3ef8eDZSEuvkbi/wsbq6YniAOYbUr7mxpmlxqm6TwkPAyjDr37sHeegRcAGYjonazBq LUAw== 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 a14si55318661pfo.37.2019.08.09.09.34.06; Fri, 09 Aug 2019 09:34:06 -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 S2437206AbfHIQeF (ORCPT + 28 others); Fri, 9 Aug 2019 12:34:05 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:58595 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407425AbfHIQeC (ORCPT ); Fri, 9 Aug 2019 12:34:02 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MOAJt-1hgXxb2QOn-00OWqK; Fri, 09 Aug 2019 18:33:46 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Arnd Bergmann , Russell King , Dan Williams , Vinod Koul , Linus Walleij , Bartosz Golaszewski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org Subject: [PATCH 4/7] dma: iop-adma: allow building without platform headers Date: Fri, 9 Aug 2019 18:33:18 +0200 Message-Id: <20190809163334.489360-4-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809163334.489360-1-arnd@arndb.de> References: <20190809162956.488941-1-arnd@arndb.de> <20190809163334.489360-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:u4Z5Q8yTDVcUzzMzBGkBzT4UZJwW8aGFhqKiWCEh7mh16JiuGrs 7IZStdUpfO8N6pAlVC7ociBXCsFHeV+1j+u3ay/XI2kwkZ/N1T3Jm2eeSBYC9ZBevNopBrt pCL+v1wAAM5qvLNpKizU7cT7FHI3Qo0OAG0+ghu3cPosZmT0m6lBrDY137x5gMwL9dwb5pX eHX+YgocfodhKYK3lJlNQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:Y3hzfQhETzE=:bt5C68uTCSgsRpntYwiNiB yp61HklJ0NRpmIM+x9rFuZ/gTBsvr+OuR+7KwtQezKsOt39h68pj6XJe5EuqkKWbb+QMy4I1x 1VMhG8AKBnjU7EHgD/uML4sQmeH7s2Ga7i3/DBayeIWNJ3djFXljMYISUohcYQARUIhrO2cB4 BNrXOu4KbHgksBV3N+gyPsYkytB4prSl9XBzOIa5O2aszVdW5T38JkD/7uZkG6aFHUCjNI4wp dBIVio3dVk4XJII4U6ewoUqnHu7JIROpc0cFQotL8Kyam3qg82nIxORo873Fs6jh2l8WUZxBM kfyvAcc2MXkMRQNESWXc9kvgUHHHtV7lnzj2ebGaImsf7dvCo8ibpVQUkki6SJsTL4G9fwJD+ 7RH58fUjLmY8EWkSc6GQk0PbE+Z3AfBtR4pdqnhVJsVi/ph2c3oqrWqOlk6TWMgcMPCj+dyj4 KAvX5HzFCXA+8gJonNk4tLTXZB9apKD6Ioj6ukWki2fiZAk7cpK70iVQ+xKM/0y4Dn2YhbJ3E ZKw9jGuDgrJ09H1wv9yA7YtJJvu0Ah+KmCoLgpiY+IJQSCQ9A5gFoXeojEGTsMnvYPAcwlHuL d8RmiZHHQQlF8NtutUikgPpwik/Sikbkza8q+rnDoNqBSvX3HSb6QIwiQqtJxepEmfV1k8Dbi 4vMq8q5vnpea7wOrxguQ3GR/3qU15bsAUXWJfZ67QZ2q+dkwXxHkZX6ncoEqDCth7qT/pfxD4 NZt37UbFd/QtkfZ/SJA9XYA4lw7Sf6yM3LjamQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that iop3xx and iop13xx are gone, the iop-adma driver no longer needs to deal with incompatible register layout defined in machine specific header files. Move the iop32x specific definitions into drivers/dma/iop-adma.h and the platform_data into include/linux/platform_data/dma-iop32x.h, and change the machine code to no longer reference those. The DMA0_ID/DMA1_ID/AAU_ID macros are required as part of the platform data interface and still need to be visible, so move those from one header to the other. Signed-off-by: Arnd Bergmann --- arch/arm/mach-iop32x/include/mach/adma.h | 6 ------ arch/arm/plat-iop/adma.c | 3 +-- drivers/dma/Kconfig | 4 ++-- drivers/dma/iop-adma.c | 3 +-- .../asm/hardware/iop3xx-adma.h => drivers/dma/iop-adma.h | 7 +------ .../iop_adma.h => include/linux/platform_data/dma-iop32x.h | 4 ++++ 6 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 arch/arm/mach-iop32x/include/mach/adma.h rename arch/arm/include/asm/hardware/iop3xx-adma.h => drivers/dma/iop-adma.h (99%) rename arch/arm/include/asm/hardware/iop_adma.h => include/linux/platform_data/dma-iop32x.h (98%) -- 2.20.0 diff --git a/arch/arm/mach-iop32x/include/mach/adma.h b/arch/arm/mach-iop32x/include/mach/adma.h deleted file mode 100644 index 2b20063123ad..000000000000 --- a/arch/arm/mach-iop32x/include/mach/adma.h +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef IOP32X_ADMA_H -#define IOP32X_ADMA_H -#include -#endif - diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c index 368496471e60..601cc9c11b07 100644 --- a/arch/arm/plat-iop/adma.c +++ b/arch/arm/plat-iop/adma.c @@ -6,8 +6,7 @@ #include #include #include -#include -#include +#include #define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT #define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index cc84863bc52b..7c511e3db4c8 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -294,8 +294,8 @@ config INTEL_IOATDMA If unsure, say N. config INTEL_IOP_ADMA - tristate "Intel IOP ADMA support" - depends on ARCH_IOP32X + tristate "Intel IOP32x ADMA support" + depends on ARCH_IOP32X || COMPILE_TEST select DMA_ENGINE select ASYNC_TX_ENABLE_CHANNEL_SWITCH help diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index aebdd671651a..03f4a588cf7f 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -22,8 +22,7 @@ #include #include -#include - +#include "iop-adma.h" #include "dmaengine.h" #define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common) diff --git a/arch/arm/include/asm/hardware/iop3xx-adma.h b/drivers/dma/iop-adma.h similarity index 99% rename from arch/arm/include/asm/hardware/iop3xx-adma.h rename to drivers/dma/iop-adma.h index 6d998df17efd..c499c9578f00 100644 --- a/arch/arm/include/asm/hardware/iop3xx-adma.h +++ b/drivers/dma/iop-adma.h @@ -6,8 +6,7 @@ #define _ADMA_H #include #include -#include -#include +#include /* Memory copy units */ #define DMA_CCR(chan) (chan->mmr_base + 0x0) @@ -34,10 +33,6 @@ #define AAU_EDCR1_IDX 17 #define AAU_EDCR2_IDX 26 -#define DMA0_ID 0 -#define DMA1_ID 1 -#define AAU_ID 2 - struct iop3xx_aau_desc_ctrl { unsigned int int_en:1; unsigned int blk1_cmd_ctrl:3; diff --git a/arch/arm/include/asm/hardware/iop_adma.h b/include/linux/platform_data/dma-iop32x.h similarity index 98% rename from arch/arm/include/asm/hardware/iop_adma.h rename to include/linux/platform_data/dma-iop32x.h index bcedbab90ac0..ac83cff89549 100644 --- a/arch/arm/include/asm/hardware/iop_adma.h +++ b/include/linux/platform_data/dma-iop32x.h @@ -17,6 +17,10 @@ #endif #define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x)) +#define DMA0_ID 0 +#define DMA1_ID 1 +#define AAU_ID 2 + /** * struct iop_adma_device - internal representation of an ADMA device * @pdev: Platform device From patchwork Fri Aug 9 16:33:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170963 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10236994ile; Fri, 9 Aug 2019 09:34:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyX1l2z//p2qGhysPXYIFxoptcVb8mSUTBLCHKrEfKylYPZPvQqMRJXTgQ5B3g8g99Ne4L1 X-Received: by 2002:a17:90b:f0e:: with SMTP id br14mr10269480pjb.117.1565368461441; Fri, 09 Aug 2019 09:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565368461; cv=none; d=google.com; s=arc-20160816; b=AzvqHkmSEJX7x+M7O3OfXqWyJGn32Kaiwt58Kwo/MGTPl58Rpq4CuVasuU27nbe47/ pEB/SZpCZjF7lI0yamYMOjtDVAVYPrEg/6jBlWnhAan86/eAFs7vl6lBA/IY1+j+tR8V LiwaS29oa2ZRvFOIWeO0hJNkzu3J3xlso4V3VpP30MFYNCY3f+brWPond7yGDRAqy40j fJiTimdbdAgbFLmK5q9Ko5o+bjJufakDyX+aw93JjLyssEPrG6t+cBCBi51m0k+JSlm6 Nr6fVL8YH8T4DjSt3x+N43YALpmIb03qkxrtT6ZiVN094XDScTQhr7OzZNeD6YjtRqe3 /cTQ== 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=9YJJVtu8cj6K4+pHYGuD4SLXUyW8SPMWVWNg0dxUwI4=; b=WZMFmiJXFoprE+dSNlKKl8+pUvDIIniMlg885H5TDaBesJ1Zw6Hx0ZQLpVJ+Tiain+ dkVTO/mnEELpofGRsghXs/EKfwZ/VrbzN2/SAX+jNO7TDfa34VhB7WGPyKdQqgpgwJmi 49X7TAJ/IUHU4kOU9SItR8bB+eeLloc+jjzBf7u4eJdIvqD08OIPwA0wQCc9OunzKZWY 6rw7Op273HiGWY2iv8cZ4PEwc5ej+Ur6PncwUe99rkjRWl4QwC+GQLpRcZXj71nj4Nz2 w70C7riz3kez7t1fWRK+u9mYCGBtj2MYAV/alIKuMsdmoX3IIkGdtI8Y8Eh7fKOnKUh3 mxOA== 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 61si55289255plb.270.2019.08.09.09.34.21; Fri, 09 Aug 2019 09:34:21 -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 S2437274AbfHIQeT (ORCPT + 28 others); Fri, 9 Aug 2019 12:34:19 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:59139 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbfHIQeS (ORCPT ); Fri, 9 Aug 2019 12:34:18 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MeCd5-1iUMvQ1qyt-00bNEQ; Fri, 09 Aug 2019 18:33:59 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Arnd Bergmann , Russell King , Dan Williams , Vinod Koul , Linus Walleij , Bartosz Golaszewski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org Subject: [PATCH 7/7] ARM: iop32x: merge everything into mach-iop32x/ Date: Fri, 9 Aug 2019 18:33:21 +0200 Message-Id: <20190809163334.489360-7-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809163334.489360-1-arnd@arndb.de> References: <20190809162956.488941-1-arnd@arndb.de> <20190809163334.489360-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:vGdFETC8T6cVfKFAfP5qqphwVXYITl9uUg+E0rFaHju/C++Ve44 mq/wBYbKOaR6GOIaaWELrDC7SW5dHg2I2f77JfKDAgbR9ck1v6uvFTOHerR+ZpptN1QaQCy WUDQzNkVZRcZn+T6SRJPYCuU+7XYIza1usj/Y8qyz6+VrocONqGG0dVhCiGPDecYyKptSkX dtxCB1zQMsUXrrIlsubGg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:1yU16ztvtR8=:tXGRaN2lEuQaRQ3YDneIIs rdkp6z7Jidn7tCD1WJs0scbdrf5bjVZpyuLa4OGVr3e1H62cuDCbw1qWfyNhOtu7HHvinb/4b 8Axo1XQRbz5cU/EDNnpO//0wdyY+AHqCPE2JhBzomQPiNeL+OKIie8O3a9P6RU45hjPxiWHiX PfDS0MvKGsDAwlbbPc42wcztYT5lxVYdW77EHG3tJ6qxaoPS2hCqVLdOoJgs45MaxshTO5jW8 OeBrd8gGyv0J9QHg/KMFKle1C3PGZiQnXSMp1ESrExC4PDVpBMoE/Oog5gMh8pdbEmfc2fjH6 m88CqcLscoENzE4EhplWmr+OYh/hkrnRh3M9QtuaZLMLyxTVOC+7f/s28cKqdd7Vhvt6sHF5y aY73IZN+ciYY0cQO1HWjyb+iHVs9sO1IEbnOzwY6tNhr04zgOdx1myL4IvGFreBQ350MLNmyN znF3PfO9bUsyVUC8LzRIy2e/0lCpIYm6NqkonQdXQzX7SNqkzB07ViIvZR79lL5m9m1VxlDlR EU6VVGbwpcHkpt0VQ+Ub02WBSTBS17fwLrkFSHt9fkhWepPMYIBkbV6jDiu+1Lnu9MdyD0/I2 xmzqYT4zfWXY8Yv+xGgflLLJqK5hraBT4mfZyT/8haiAv2CClu/tSEGeXu9T/hjNISMns1ZFu 9anibrnKlTD+wvYgpK/gIaVcehn2S53FKNuQgr5wIj4jWgCndOvzE7KC27phRT95QfNnno0e2 hdXTD9i+8E3equE0gnw5/fjCo/jranU2IZLMJe0MBUOXpyT3AQfdkj1dlcw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Various bits of iop32x are now in their traditional locations in plat-iop, mach-iop/include/mach/ and in include/asm/mach/hardware. As nothing outside of the iop32x mach code references these any more, this can all be moved into one place now. The only remaining things in the include/mach/ directory are now the NR_IRQS definition, the entry-macros.S file and the the decompressor uart access. After the irqchip code has been converted to SPARSE_IRQ and GENERIC_IRQ_MULTI_HANDLER, it can be moved to ARCH_MULTIPLATFORM. Signed-off-by: Arnd Bergmann --- arch/arm/Makefile | 1 - arch/arm/mach-iop32x/Makefile | 10 ++++- arch/arm/{plat-iop => mach-iop32x}/adma.c | 4 +- arch/arm/{plat-iop => mach-iop32x}/cp6.c | 0 arch/arm/mach-iop32x/em7210.c | 5 ++- arch/arm/mach-iop32x/glantank.c | 5 ++- .../mach-iop32x/{include/mach => }/glantank.h | 2 - .../mach-iop32x/{include/mach => }/hardware.h | 6 +-- arch/arm/{plat-iop => mach-iop32x}/i2c.c | 6 ++- .../mach-iop32x/include/mach/entry-macro.S | 2 - arch/arm/mach-iop32x/include/mach/iop32x.h | 31 -------------- arch/arm/mach-iop32x/include/mach/irqs.h | 33 --------------- arch/arm/mach-iop32x/include/mach/time.h | 5 --- .../asm/hardware => mach-iop32x}/iop3xx.h | 18 +++++++- arch/arm/mach-iop32x/iq31244.c | 5 ++- .../mach-iop32x/{include/mach => }/iq31244.h | 2 - arch/arm/mach-iop32x/iq80321.c | 5 ++- .../mach-iop32x/{include/mach => }/iq80321.h | 2 - arch/arm/mach-iop32x/irq.c | 3 +- arch/arm/mach-iop32x/irqs.h | 42 +++++++++++++++++++ arch/arm/mach-iop32x/n2100.c | 5 ++- .../mach-iop32x/{include/mach => }/n2100.h | 2 - arch/arm/{plat-iop => mach-iop32x}/pci.c | 4 +- arch/arm/{plat-iop => mach-iop32x}/pmu.c | 2 +- arch/arm/{plat-iop => mach-iop32x}/restart.c | 4 +- arch/arm/{plat-iop => mach-iop32x}/setup.c | 2 +- arch/arm/{plat-iop => mach-iop32x}/time.c | 7 ++-- arch/arm/plat-iop/Makefile | 14 ------- 28 files changed, 102 insertions(+), 125 deletions(-) rename arch/arm/{plat-iop => mach-iop32x}/adma.c (98%) rename arch/arm/{plat-iop => mach-iop32x}/cp6.c (100%) rename arch/arm/mach-iop32x/{include/mach => }/glantank.h (78%) rename arch/arm/mach-iop32x/{include/mach => }/hardware.h (90%) rename arch/arm/{plat-iop => mach-iop32x}/i2c.c (96%) delete mode 100644 arch/arm/mach-iop32x/include/mach/iop32x.h delete mode 100644 arch/arm/mach-iop32x/include/mach/time.h rename arch/arm/{include/asm/hardware => mach-iop32x}/iop3xx.h (96%) rename arch/arm/mach-iop32x/{include/mach => }/iq31244.h (89%) rename arch/arm/mach-iop32x/{include/mach => }/iq80321.h (89%) create mode 100644 arch/arm/mach-iop32x/irqs.h rename arch/arm/mach-iop32x/{include/mach => }/n2100.h (89%) rename arch/arm/{plat-iop => mach-iop32x}/pci.c (99%) rename arch/arm/{plat-iop => mach-iop32x}/pmu.c (96%) rename arch/arm/{plat-iop => mach-iop32x}/restart.c (82%) rename arch/arm/{plat-iop => mach-iop32x}/setup.c (95%) rename arch/arm/{plat-iop => mach-iop32x}/time.c (97%) delete mode 100644 arch/arm/plat-iop/Makefile -- 2.20.0 diff --git a/arch/arm/Makefile b/arch/arm/Makefile index d92bc5328df7..075dd2f06d78 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -231,7 +231,6 @@ plat-$(CONFIG_ARCH_EXYNOS) += samsung plat-$(CONFIG_ARCH_OMAP) += omap plat-$(CONFIG_ARCH_S3C64XX) += samsung plat-$(CONFIG_ARCH_S5PV210) += samsung -plat-$(CONFIG_PLAT_IOP) += iop plat-$(CONFIG_PLAT_ORION) += orion plat-$(CONFIG_PLAT_PXA) += pxa plat-$(CONFIG_PLAT_S3C24XX) += samsung diff --git a/arch/arm/mach-iop32x/Makefile b/arch/arm/mach-iop32x/Makefile index 71d62447d4d5..c8018ef5c6a9 100644 --- a/arch/arm/mach-iop32x/Makefile +++ b/arch/arm/mach-iop32x/Makefile @@ -3,7 +3,15 @@ # Makefile for the linux kernel. # -obj-y := irq.o +obj-$(CONFIG_ARCH_IOP32X) += irq.o +obj-$(CONFIG_ARCH_IOP32X) += i2c.o +obj-$(CONFIG_ARCH_IOP32X) += pci.o +obj-$(CONFIG_ARCH_IOP32X) += setup.o +obj-$(CONFIG_ARCH_IOP32X) += time.o +obj-$(CONFIG_ARCH_IOP32X) += cp6.o +obj-$(CONFIG_ARCH_IOP32X) += adma.o +obj-$(CONFIG_ARCH_IOP32X) += pmu.o +obj-$(CONFIG_ARCH_IOP32X) += restart.o obj-$(CONFIG_MACH_GLANTANK) += glantank.o obj-$(CONFIG_ARCH_IQ80321) += iq80321.o diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/mach-iop32x/adma.c similarity index 98% rename from arch/arm/plat-iop/adma.c rename to arch/arm/mach-iop32x/adma.c index 601cc9c11b07..764bcbff98df 100644 --- a/arch/arm/plat-iop/adma.c +++ b/arch/arm/mach-iop32x/adma.c @@ -4,10 +4,12 @@ * Copyright © 2006, Intel Corporation. */ #include -#include #include #include +#include "iop3xx.h" +#include "irqs.h" + #define IRQ_DMA0_EOT IRQ_IOP32X_DMA0_EOT #define IRQ_DMA0_EOC IRQ_IOP32X_DMA0_EOC #define IRQ_DMA0_ERR IRQ_IOP32X_DMA0_ERR diff --git a/arch/arm/plat-iop/cp6.c b/arch/arm/mach-iop32x/cp6.c similarity index 100% rename from arch/arm/plat-iop/cp6.c rename to arch/arm/mach-iop32x/cp6.c diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c index 61a1e593f9ec..d43ced3cd4e7 100644 --- a/arch/arm/mach-iop32x/em7210.c +++ b/arch/arm/mach-iop32x/em7210.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -29,8 +28,10 @@ #include #include #include -#include + +#include "hardware.h" #include "gpio-iop32x.h" +#include "irqs.h" static void __init em7210_timer_init(void) { diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index 5a45d616d9ac..2fe0f77d1f1d 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -30,8 +29,10 @@ #include #include #include -#include + +#include "hardware.h" #include "gpio-iop32x.h" +#include "irqs.h" /* * GLAN Tank timer tick configuration. diff --git a/arch/arm/mach-iop32x/include/mach/glantank.h b/arch/arm/mach-iop32x/glantank.h similarity index 78% rename from arch/arm/mach-iop32x/include/mach/glantank.h rename to arch/arm/mach-iop32x/glantank.h index b9df2e4614cf..f38e86b82c3d 100644 --- a/arch/arm/mach-iop32x/include/mach/glantank.h +++ b/arch/arm/mach-iop32x/glantank.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * arch/arm/mach-iop32x/include/mach/glantank.h - * * IO-Data GLAN Tank board registers */ diff --git a/arch/arm/mach-iop32x/include/mach/hardware.h b/arch/arm/mach-iop32x/hardware.h similarity index 90% rename from arch/arm/mach-iop32x/include/mach/hardware.h rename to arch/arm/mach-iop32x/hardware.h index 6e5303e60226..43ab4fb8f9b0 100644 --- a/arch/arm/mach-iop32x/include/mach/hardware.h +++ b/arch/arm/mach-iop32x/hardware.h @@ -1,8 +1,4 @@ /* SPDX-License-Identifier: GPL-2.0 */ -/* - * arch/arm/mach-iop32x/include/mach/hardware.h - */ - #ifndef __HARDWARE_H #define __HARDWARE_H @@ -28,7 +24,7 @@ void iop32x_init_irq(void); /* * Generic chipset bits */ -#include "iop32x.h" +#include "iop3xx.h" /* * Board specific bits diff --git a/arch/arm/plat-iop/i2c.c b/arch/arm/mach-iop32x/i2c.c similarity index 96% rename from arch/arm/plat-iop/i2c.c rename to arch/arm/mach-iop32x/i2c.c index 8d5fe349c7cd..dc9f6a14ab1b 100644 --- a/arch/arm/plat-iop/i2c.c +++ b/arch/arm/mach-iop32x/i2c.c @@ -22,10 +22,12 @@ #include #include #include -#include -#include #include +#include "hardware.h" +#include "iop3xx.h" +#include "irqs.h" + /* * Each of the I2C busses have corresponding GPIO lines, and the driver * need to access these directly to drive the bus low at times. diff --git a/arch/arm/mach-iop32x/include/mach/entry-macro.S b/arch/arm/mach-iop32x/include/mach/entry-macro.S index ea13ae02d9b1..8e6766d4621e 100644 --- a/arch/arm/mach-iop32x/include/mach/entry-macro.S +++ b/arch/arm/mach-iop32x/include/mach/entry-macro.S @@ -7,8 +7,6 @@ * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ -#include - .macro get_irqnr_preamble, base, tmp mrc p15, 0, \tmp, c15, c1, 0 orr \tmp, \tmp, #(1 << 6) diff --git a/arch/arm/mach-iop32x/include/mach/iop32x.h b/arch/arm/mach-iop32x/include/mach/iop32x.h deleted file mode 100644 index 84223f86552f..000000000000 --- a/arch/arm/mach-iop32x/include/mach/iop32x.h +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * arch/arm/mach-iop32x/include/mach/iop32x.h - * - * Intel IOP32X Chip definitions - * - * Author: Rory Bolt - * Copyright (C) 2002 Rory Bolt - * Copyright (C) 2004 Intel Corp. - */ - -#ifndef __IOP32X_H -#define __IOP32X_H - -/* - * Peripherals that are shared between the iop32x and iop33x but - * located at different addresses. - */ -#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg)) - -#include - -/* ATU Parameters - * set up a 1:1 bus to physical ram relationship - * w/ physical ram on top of pci in the memory map - */ -#define IOP32X_MAX_RAM_SIZE 0x40000000UL -#define IOP3XX_MAX_RAM_SIZE IOP32X_MAX_RAM_SIZE -#define IOP3XX_PCI_LOWER_MEM_BA 0x80000000 - -#endif diff --git a/arch/arm/mach-iop32x/include/mach/irqs.h b/arch/arm/mach-iop32x/include/mach/irqs.h index 82b11743e91c..c4e78df428e8 100644 --- a/arch/arm/mach-iop32x/include/mach/irqs.h +++ b/arch/arm/mach-iop32x/include/mach/irqs.h @@ -9,39 +9,6 @@ #ifndef __IRQS_H #define __IRQS_H -/* - * IOP80321 chipset interrupts - */ -#define IRQ_IOP32X_DMA0_EOT 0 -#define IRQ_IOP32X_DMA0_EOC 1 -#define IRQ_IOP32X_DMA1_EOT 2 -#define IRQ_IOP32X_DMA1_EOC 3 -#define IRQ_IOP32X_AA_EOT 6 -#define IRQ_IOP32X_AA_EOC 7 -#define IRQ_IOP32X_CORE_PMON 8 -#define IRQ_IOP32X_TIMER0 9 -#define IRQ_IOP32X_TIMER1 10 -#define IRQ_IOP32X_I2C_0 11 -#define IRQ_IOP32X_I2C_1 12 -#define IRQ_IOP32X_MESSAGING 13 -#define IRQ_IOP32X_ATU_BIST 14 -#define IRQ_IOP32X_PERFMON 15 -#define IRQ_IOP32X_CORE_PMU 16 -#define IRQ_IOP32X_BIU_ERR 17 -#define IRQ_IOP32X_ATU_ERR 18 -#define IRQ_IOP32X_MCU_ERR 19 -#define IRQ_IOP32X_DMA0_ERR 20 -#define IRQ_IOP32X_DMA1_ERR 21 -#define IRQ_IOP32X_AA_ERR 23 -#define IRQ_IOP32X_MSG_ERR 24 -#define IRQ_IOP32X_SSP 25 -#define IRQ_IOP32X_XINT0 27 -#define IRQ_IOP32X_XINT1 28 -#define IRQ_IOP32X_XINT2 29 -#define IRQ_IOP32X_XINT3 30 -#define IRQ_IOP32X_HPI 31 - #define NR_IRQS 32 - #endif diff --git a/arch/arm/mach-iop32x/include/mach/time.h b/arch/arm/mach-iop32x/include/mach/time.h deleted file mode 100644 index d08950ccebc4..000000000000 --- a/arch/arm/mach-iop32x/include/mach/time.h +++ /dev/null @@ -1,5 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _IOP32X_TIME_H_ -#define _IOP32X_TIME_H_ -#define IRQ_IOP_TIMER0 IRQ_IOP32X_TIMER0 -#endif diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/mach-iop32x/iop3xx.h similarity index 96% rename from arch/arm/include/asm/hardware/iop3xx.h rename to arch/arm/mach-iop32x/iop3xx.h index 3cb6f22f510b..46b4b34a4ad2 100644 --- a/arch/arm/include/asm/hardware/iop3xx.h +++ b/arch/arm/mach-iop32x/iop3xx.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * arch/arm/include/asm/hardware/iop3xx.h - * * Intel IOP32X and IOP33X register definitions * * Author: Rory Bolt @@ -12,6 +10,22 @@ #ifndef __IOP3XX_H #define __IOP3XX_H +/* + * Peripherals that are shared between the iop32x and iop33x but + * located at different addresses. + */ +#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg)) + +#include "iop3xx.h" + +/* ATU Parameters + * set up a 1:1 bus to physical ram relationship + * w/ physical ram on top of pci in the memory map + */ +#define IOP32X_MAX_RAM_SIZE 0x40000000UL +#define IOP3XX_MAX_RAM_SIZE IOP32X_MAX_RAM_SIZE +#define IOP3XX_PCI_LOWER_MEM_BA 0x80000000 + /* * IOP3XX GPIO handling */ diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index 8755aa87e591..04a7d389d365 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -33,7 +32,9 @@ #include #include #include -#include + +#include "hardware.h" +#include "irqs.h" #include "gpio-iop32x.h" /* diff --git a/arch/arm/mach-iop32x/include/mach/iq31244.h b/arch/arm/mach-iop32x/iq31244.h similarity index 89% rename from arch/arm/mach-iop32x/include/mach/iq31244.h rename to arch/arm/mach-iop32x/iq31244.h index e62da5da6ed4..a7ac691e48d3 100644 --- a/arch/arm/mach-iop32x/include/mach/iq31244.h +++ b/arch/arm/mach-iop32x/iq31244.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * arch/arm/mach-iop32x/include/mach/iq31244.h - * * Intel IQ31244 evaluation board registers */ diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index e12699d1c540..4bd596d6c9c1 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -29,7 +28,9 @@ #include #include #include -#include + +#include "hardware.h" +#include "irqs.h" #include "gpio-iop32x.h" /* diff --git a/arch/arm/mach-iop32x/include/mach/iq80321.h b/arch/arm/mach-iop32x/iq80321.h similarity index 89% rename from arch/arm/mach-iop32x/include/mach/iq80321.h rename to arch/arm/mach-iop32x/iq80321.h index faf62c26f6f8..3a5d10626ea6 100644 --- a/arch/arm/mach-iop32x/include/mach/iq80321.h +++ b/arch/arm/mach-iop32x/iq80321.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * arch/arm/mach-iop32x/include/mach/iq80321.h - * * Intel IQ80321 evaluation board registers */ diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c index 2f5d4ec94f9c..2d48bf1398c1 100644 --- a/arch/arm/mach-iop32x/irq.c +++ b/arch/arm/mach-iop32x/irq.c @@ -13,9 +13,10 @@ #include #include #include -#include #include +#include "hardware.h" + static u32 iop32x_mask; static void intctl_write(u32 val) diff --git a/arch/arm/mach-iop32x/irqs.h b/arch/arm/mach-iop32x/irqs.h new file mode 100644 index 000000000000..69858e4e905d --- /dev/null +++ b/arch/arm/mach-iop32x/irqs.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Author: Rory Bolt + * Copyright: (C) 2002 Rory Bolt + */ + +#ifndef __IOP32X_IRQS_H +#define __IOP32X_IRQS_H + +/* + * IOP80321 chipset interrupts + */ +#define IRQ_IOP32X_DMA0_EOT 0 +#define IRQ_IOP32X_DMA0_EOC 1 +#define IRQ_IOP32X_DMA1_EOT 2 +#define IRQ_IOP32X_DMA1_EOC 3 +#define IRQ_IOP32X_AA_EOT 6 +#define IRQ_IOP32X_AA_EOC 7 +#define IRQ_IOP32X_CORE_PMON 8 +#define IRQ_IOP32X_TIMER0 9 +#define IRQ_IOP32X_TIMER1 10 +#define IRQ_IOP32X_I2C_0 11 +#define IRQ_IOP32X_I2C_1 12 +#define IRQ_IOP32X_MESSAGING 13 +#define IRQ_IOP32X_ATU_BIST 14 +#define IRQ_IOP32X_PERFMON 15 +#define IRQ_IOP32X_CORE_PMU 16 +#define IRQ_IOP32X_BIU_ERR 17 +#define IRQ_IOP32X_ATU_ERR 18 +#define IRQ_IOP32X_MCU_ERR 19 +#define IRQ_IOP32X_DMA0_ERR 20 +#define IRQ_IOP32X_DMA1_ERR 21 +#define IRQ_IOP32X_AA_ERR 23 +#define IRQ_IOP32X_MSG_ERR 24 +#define IRQ_IOP32X_SSP 25 +#define IRQ_IOP32X_XINT0 27 +#define IRQ_IOP32X_XINT1 28 +#define IRQ_IOP32X_XINT2 29 +#define IRQ_IOP32X_XINT3 30 +#define IRQ_IOP32X_HPI 31 + +#endif diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 26d76b377e79..5382a93ad0f8 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -37,7 +36,9 @@ #include #include #include -#include + +#include "hardware.h" +#include "irqs.h" #include "gpio-iop32x.h" /* diff --git a/arch/arm/mach-iop32x/include/mach/n2100.h b/arch/arm/mach-iop32x/n2100.h similarity index 89% rename from arch/arm/mach-iop32x/include/mach/n2100.h rename to arch/arm/mach-iop32x/n2100.h index 70bb660b643a..0b97b940d3e7 100644 --- a/arch/arm/mach-iop32x/include/mach/n2100.h +++ b/arch/arm/mach-iop32x/n2100.h @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * arch/arm/mach-iop32x/include/mach/n2100.h - * * Thecus N2100 board registers */ diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/mach-iop32x/pci.c similarity index 99% rename from arch/arm/plat-iop/pci.c rename to arch/arm/mach-iop32x/pci.c index 4c42c95e4bf5..ab0010dc3145 100644 --- a/arch/arm/plat-iop/pci.c +++ b/arch/arm/mach-iop32x/pci.c @@ -17,9 +17,9 @@ #include #include #include -#include #include -#include +#include "hardware.h" +#include "iop3xx.h" // #define DEBUG diff --git a/arch/arm/plat-iop/pmu.c b/arch/arm/mach-iop32x/pmu.c similarity index 96% rename from arch/arm/plat-iop/pmu.c rename to arch/arm/mach-iop32x/pmu.c index 3834142c17f4..bdbc7a3cb8a3 100644 --- a/arch/arm/plat-iop/pmu.c +++ b/arch/arm/mach-iop32x/pmu.c @@ -5,7 +5,7 @@ */ #include -#include +#include "irqs.h" static struct resource pmu_resource = { .start = IRQ_IOP32X_CORE_PMU, diff --git a/arch/arm/plat-iop/restart.c b/arch/arm/mach-iop32x/restart.c similarity index 82% rename from arch/arm/plat-iop/restart.c rename to arch/arm/mach-iop32x/restart.c index cf6d3d9a2112..3dfa54d3a7a8 100644 --- a/arch/arm/plat-iop/restart.c +++ b/arch/arm/mach-iop32x/restart.c @@ -4,9 +4,9 @@ * * Copyright (C) 2001 MontaVista Software, Inc. */ -#include #include -#include +#include "hardware.h" +#include "iop3xx.h" void iop3xx_restart(enum reboot_mode mode, const char *cmd) { diff --git a/arch/arm/plat-iop/setup.c b/arch/arm/mach-iop32x/setup.c similarity index 95% rename from arch/arm/plat-iop/setup.c rename to arch/arm/mach-iop32x/setup.c index d10e0102d82c..a0a81c28a632 100644 --- a/arch/arm/plat-iop/setup.c +++ b/arch/arm/mach-iop32x/setup.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include "iop3xx.h" /* * Standard IO mapping for all IOP3xx based systems. Note that diff --git a/arch/arm/plat-iop/time.c b/arch/arm/mach-iop32x/time.c similarity index 97% rename from arch/arm/plat-iop/time.c rename to arch/arm/mach-iop32x/time.c index f9dd1f50cfe5..18a4df5c1baa 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/mach-iop32x/time.c @@ -19,12 +19,13 @@ #include #include #include -#include #include #include #include #include -#include + +#include "hardware.h" +#include "irqs.h" /* * Minimum clocksource/clockevent timer range in seconds @@ -167,7 +168,7 @@ void __init iop_init_time(unsigned long tick_rate) */ write_tmr0(timer_ctl & ~IOP_TMR_EN); write_tisr(1); - setup_irq(IRQ_IOP_TIMER0, &iop_timer_irq); + setup_irq(IRQ_IOP32X_TIMER0, &iop_timer_irq); iop_clockevent.cpumask = cpumask_of(0); clockevents_config_and_register(&iop_clockevent, tick_rate, 0xf, 0xfffffffe); diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile deleted file mode 100644 index 86e354b9065d..000000000000 --- a/arch/arm/plat-iop/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# -# Makefile for the linux kernel. -# - -# IOP32X -obj-$(CONFIG_ARCH_IOP32X) += i2c.o -obj-$(CONFIG_ARCH_IOP32X) += pci.o -obj-$(CONFIG_ARCH_IOP32X) += setup.o -obj-$(CONFIG_ARCH_IOP32X) += time.o -obj-$(CONFIG_ARCH_IOP32X) += cp6.o -obj-$(CONFIG_ARCH_IOP32X) += adma.o -obj-$(CONFIG_ARCH_IOP32X) += pmu.o -obj-$(CONFIG_ARCH_IOP32X) += restart.o