From patchwork Fri Feb 8 17:34:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10803591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4C7813BF for ; Fri, 8 Feb 2019 17:53:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 935332EC90 for ; Fri, 8 Feb 2019 17:53:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 909A92ECF7; Fri, 8 Feb 2019 17:53:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E39252ECD6 for ; Fri, 8 Feb 2019 17:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2t+oSgyHjm9G3iWvmw58RNsIxZKRNu+tdGNvj5Opa0Q=; b=TrP1BcAolrd9eF brAT6b8CTyoqYfW4O73XpP/n6mPD+9WksZGW20tns8BsIx6zIHnZZhs/Xjb9L0V1vIUCOSRITPmDk lgTHupBWnLvgrCLBiIUicpk+DOaqhL1+6J/tcYT5/erEj3bYGzK+rUCD8GpjJBoxOjjC8MAX4i9jd mzW1aqE24wVekD7AiAz58+PEJ4IQ5L3fOw8dVEw9S9H/F3OM2idFqKmHC9mEJVG0pvMtXTYriPec5 E111brymMhhKkyop9mn7UlW3rCdHZVrQ1tuL+F13hAKwt5s3D5Qdne2CrUo3xh9dlj0RWnYzaF5oP R+Gc3kZzk3KO37kQJaLA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gsAL4-0006Dt-8G; Fri, 08 Feb 2019 17:53:22 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gsAJC-0003oI-CF for linux-arm-kernel@bombadil.infradead.org; Fri, 08 Feb 2019 17:51:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2DeiZ8D7UiVmGGxb7P14iUU29iY/Sp7nuKJSfeun7aM=; b=ndSjOugtPcwMb9JDnvfkKXYpaE 4+7uHR/mxnfCnfWjvmz0j0vjTszGCrGtkxzawnn4ehaUKP45HJYF19N84BrpwzMhc0QC7xyFvzx3Z wvviBw/qxaw6ZqXM+AGFeKBfRmYuW/SIFIYUdjW9t//cyb7n8WtaLxYbepFNefqSMnFYLFkvA8BEh Od9OjekVDqWtaAH/ks6MnkGqiqiqGEV76Ke20ZyHVYkvDB2TyZmB5KTogi5xoIdmn3k0BhjopdgKk T9j74qsModY8v4m3bKx9wnEms/WeN/y57oGASU7ozGPsrhcD501Pu23hjZKpp3P3RaEQs4D8PcA6b SMpydvXA==; Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gsA3o-0006bo-UC for linux-arm-kernel@lists.infradead.org; Fri, 08 Feb 2019 17:35:40 +0000 Received: by mail-wm1-x342.google.com with SMTP id r17so4321764wmh.5 for ; Fri, 08 Feb 2019 09:35:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2DeiZ8D7UiVmGGxb7P14iUU29iY/Sp7nuKJSfeun7aM=; b=gNKMNCVJSlmbzC5CR0CbOzXzt/Ie9VdTVT4gOaI9M71ndwKkiXRm+MNGncpOEuEbmx pPuFTFeAg0sx4LGyFq+sj7+hnIVcdbI5/NleAa2lVRdhE+XJkDLDd+OKAdYbXRFiu5Bs uobl2ABxKAcegdYxp0g3UQSy3saRxWkKFINJlH+8Pg8PaX6NL5wSjbgsnESF3aZdUpnp QR50rCJ+hlYquqHJzgmXJLYUn3XT2WcYs+ZDG33jgRbRoJkOD7k7ChKZo6jflADnj2wd AzOmYdwm/RMES91QUmSKxtetdQ+lOVWCviA8ataMif0IjJ2TVABRMrRx3M9lgCKLbZS8 Bckw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2DeiZ8D7UiVmGGxb7P14iUU29iY/Sp7nuKJSfeun7aM=; b=N4uPfwgi9WleNRpYVuJOSwYODNmmMN2dnh4joZb/mC4dpf3GFzz12LFvvUJRN0OcWl L8ijEl/guOcQY8T0E4hwyvzOf3lpecnum/1mytCpwuFe0LJSTim5szfqPHz8ISZLa9b2 ce30cGTWyZgQnED4lCqoxnhf4wLxwI4LlGWuC5Tw8LBMgBNtNkd3CoSN4nSIG+qX7S/Q XwZp6sXpSe0Uv0kbN3ckwsRRBRFT5matNYLvg907ifhN0hY72ttaNtdjX8LKIqv4IkCw SVZzNDzawSOt4495O8FGBSgGNek0phPDdXEs/t7u8tyUVxXvNk2yeZizPp717M1Fpcgc TLSw== X-Gm-Message-State: AHQUAuYqqcDPi1j5IWhfVUZGmr2MecqMr1YwY/HJIYxMSxQjHv/KG0zH Wi2Z+jbYgvCgXod0P9dmPKSORQ== X-Google-Smtp-Source: AHgI3IZJanFqCbDXkkgvLIfIcEPRGYmEqzW5ugHbdT54Bej8prjAPTuu3/BSMKptdExU4ClPyOTGVw== X-Received: by 2002:a1c:7a16:: with SMTP id v22mr11561795wmc.131.1549647330387; Fri, 08 Feb 2019 09:35:30 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id p17sm354714wrv.59.2019.02.08.09.35.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 09:35:29 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Daniel Lezcano , Rob Herring , Mark Rutland , Thomas Gleixner , David Lechner Subject: [PATCH v2 20/33] ARM: davinci: cp-intc: remove cp_intc.h Date: Fri, 8 Feb 2019 18:34:45 +0100 Message-Id: <20190208173458.4801-21-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190208173458.4801-1-brgl@bgdev.pl> References: <20190208173458.4801-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190208_173533_077394_09D7AA13 X-CRM114-Status: GOOD ( 21.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski There's no need to have a local header for cp-intc. Move the only declaration for a public function to common.h. Move all register offsets into the driver source file and drop all unused defines. Make cp_intc_of_init() static. Signed-off-by: Bartosz Golaszewski Reviewed-by: David Lechner --- arch/arm/mach-davinci/board-da830-evm.c | 1 - arch/arm/mach-davinci/board-da850-evm.c | 1 - arch/arm/mach-davinci/board-mityomapl138.c | 1 - arch/arm/mach-davinci/board-omapl138-hawk.c | 1 - arch/arm/mach-davinci/cp_intc.c | 20 +++++++- arch/arm/mach-davinci/cp_intc.h | 57 --------------------- arch/arm/mach-davinci/include/mach/common.h | 1 + 7 files changed, 19 insertions(+), 63 deletions(-) delete mode 100644 arch/arm/mach-davinci/cp_intc.h diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 7b8c4aeca096..f81c92b9cf07 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -39,7 +39,6 @@ #include #include -#include "cp_intc.h" #include "irqs.h" #define DA830_EVM_PHY_ID "" diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index b0814bd30a1f..1cc49e7bf128 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -46,7 +46,6 @@ #include #include -#include "cp_intc.h" #include "irqs.h" #include "sram.h" diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 8df16e81b69e..eb6a9465f229 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -27,7 +27,6 @@ #include #include #include -#include "cp_intc.h" #include #include #include diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 94c4f126ef86..7f852722ff08 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -27,7 +27,6 @@ #include #include -#include "cp_intc.h" #include #include diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index 4e293cde20fb..82110d332c82 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c @@ -21,7 +21,22 @@ #include #include -#include "cp_intc.h" + +#define CP_INTC_CTRL 0x04 +#define CP_INTC_HOST_CTRL 0x0C +#define CP_INTC_GLOBAL_ENABLE 0x10 +#define CP_INTC_SYS_STAT_IDX_CLR 0x24 +#define CP_INTC_SYS_ENABLE_IDX_SET 0x28 +#define CP_INTC_SYS_ENABLE_IDX_CLR 0x2C +#define CP_INTC_HOST_ENABLE_IDX_SET 0x34 +#define CP_INTC_HOST_ENABLE_IDX_CLR 0x38 +#define CP_INTC_PRIO_IDX 0x80 +#define CP_INTC_SYS_STAT_CLR(n) (0x0280 + (n << 2)) +#define CP_INTC_SYS_ENABLE_CLR(n) (0x0380 + (n << 2)) +#define CP_INTC_CHAN_MAP(n) (0x0400 + (n << 2)) +#define CP_INTC_SYS_POLARITY(n) (0x0D00 + (n << 2)) +#define CP_INTC_SYS_TYPE(n) (0x0D80 + (n << 2)) +#define CP_INTC_HOST_ENABLE(n) (0x1500 + (n << 2)) #define DAVINCI_CP_INTC_PRI_INDX_MASK GENMASK(9, 0) #define DAVINCI_CP_INTC_GPIR_NONE BIT(31) @@ -141,7 +156,8 @@ static const struct irq_domain_ops cp_intc_host_ops = { .xlate = irq_domain_xlate_onetwocell, }; -int __init cp_intc_of_init(struct device_node *node, struct device_node *parent) +static int __init cp_intc_of_init(struct device_node *node, + struct device_node *parent) { u32 num_irq = davinci_soc_info.intc_irq_num; u8 *irq_prio = davinci_soc_info.intc_irq_prios; diff --git a/arch/arm/mach-davinci/cp_intc.h b/arch/arm/mach-davinci/cp_intc.h deleted file mode 100644 index 827bbe9baed4..000000000000 --- a/arch/arm/mach-davinci/cp_intc.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * TI Common Platform Interrupt Controller (cp_intc) definitions - * - * Author: Steve Chen - * Copyright (C) 2008-2009, MontaVista Software, Inc. - * - * 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. - */ -#ifndef __ASM_HARDWARE_CP_INTC_H -#define __ASM_HARDWARE_CP_INTC_H - -#define CP_INTC_REV 0x00 -#define CP_INTC_CTRL 0x04 -#define CP_INTC_HOST_CTRL 0x0C -#define CP_INTC_GLOBAL_ENABLE 0x10 -#define CP_INTC_GLOBAL_NESTING_LEVEL 0x1C -#define CP_INTC_SYS_STAT_IDX_SET 0x20 -#define CP_INTC_SYS_STAT_IDX_CLR 0x24 -#define CP_INTC_SYS_ENABLE_IDX_SET 0x28 -#define CP_INTC_SYS_ENABLE_IDX_CLR 0x2C -#define CP_INTC_GLOBAL_WAKEUP_ENABLE 0x30 -#define CP_INTC_HOST_ENABLE_IDX_SET 0x34 -#define CP_INTC_HOST_ENABLE_IDX_CLR 0x38 -#define CP_INTC_PACING_PRESCALE 0x40 -#define CP_INTC_VECTOR_BASE 0x50 -#define CP_INTC_VECTOR_SIZE 0x54 -#define CP_INTC_VECTOR_NULL 0x58 -#define CP_INTC_PRIO_IDX 0x80 -#define CP_INTC_PRIO_VECTOR 0x84 -#define CP_INTC_SECURE_ENABLE 0x90 -#define CP_INTC_SECURE_PRIO_IDX 0x94 -#define CP_INTC_PACING_PARAM(n) (0x0100 + (n << 4)) -#define CP_INTC_PACING_DEC(n) (0x0104 + (n << 4)) -#define CP_INTC_PACING_MAP(n) (0x0108 + (n << 4)) -#define CP_INTC_SYS_RAW_STAT(n) (0x0200 + (n << 2)) -#define CP_INTC_SYS_STAT_CLR(n) (0x0280 + (n << 2)) -#define CP_INTC_SYS_ENABLE_SET(n) (0x0300 + (n << 2)) -#define CP_INTC_SYS_ENABLE_CLR(n) (0x0380 + (n << 2)) -#define CP_INTC_CHAN_MAP(n) (0x0400 + (n << 2)) -#define CP_INTC_HOST_MAP(n) (0x0800 + (n << 2)) -#define CP_INTC_HOST_PRIO_IDX(n) (0x0900 + (n << 2)) -#define CP_INTC_SYS_POLARITY(n) (0x0D00 + (n << 2)) -#define CP_INTC_SYS_TYPE(n) (0x0D80 + (n << 2)) -#define CP_INTC_WAKEUP_ENABLE(n) (0x0E00 + (n << 2)) -#define CP_INTC_DEBUG_SELECT(n) (0x0F00 + (n << 2)) -#define CP_INTC_SYS_SECURE_ENABLE(n) (0x1000 + (n << 2)) -#define CP_INTC_HOST_NESTING_LEVEL(n) (0x1100 + (n << 2)) -#define CP_INTC_HOST_ENABLE(n) (0x1500 + (n << 2)) -#define CP_INTC_HOST_PRIO_VECTOR(n) (0x1600 + (n << 2)) -#define CP_INTC_VECTOR_ADDR(n) (0x2000 + (n << 2)) - -void cp_intc_init(void); -int cp_intc_of_init(struct device_node *, struct device_node *); - -#endif /* __ASM_HARDWARE_CP_INTC_H */ diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h index 14e0e1c40611..3f3f1169d47e 100644 --- a/arch/arm/mach-davinci/include/mach/common.h +++ b/arch/arm/mach-davinci/include/mach/common.h @@ -22,6 +22,7 @@ #define DAVINCI_INTC_START NR_IRQS #define DAVINCI_INTC_IRQ(_irqnum) (DAVINCI_INTC_START + (_irqnum)) +void cp_intc_init(void); void davinci_timer_init(struct clk *clk); struct davinci_timer_instance {