Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2528159imj; Mon, 11 Feb 2019 04:29:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IaAvfAis1q2GizBPvQ5RJAyCg7NVnvYKmNO5gflJM7KGubKjf5LRlyD27FRAI66Gn8IOnx2 X-Received: by 2002:a65:620a:: with SMTP id d10mr32408353pgv.75.1549888143076; Mon, 11 Feb 2019 04:29:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549888143; cv=none; d=google.com; s=arc-20160816; b=Q6GpNPTbWG6vlJjMyc805pl9+ElWCnu5CtffWyARbRIYKQeLjH5UFexup4jdXqIYjS H4r05RyajQjJq0p2XQxW1PdZbkqWQvuDlhvxmvrFyAQDmBN8kf7Hyj+elsfwURQlT96B PbQIxq5+830RqmFe8rP0neyH8OjqvTNreUGmJjlJUfY/KckwiOqcZ7p6J5uI1zUWMf/z 6rx8q4Sx24xZ95GqcmX4ZLgHvQrJ9KuxCK0nqQovV3ubX/lUW2ar2OQ5Fonqi7SHse+d mARqlH7dP1cReiw3Ga3BtoAJJ0LYbnPsP2oyJffMnev9G28ZOKNxkBWXkMISsOWSWa3Y lihA== 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 :dkim-signature; bh=2DeiZ8D7UiVmGGxb7P14iUU29iY/Sp7nuKJSfeun7aM=; b=BPx0inuaDdeGSDETNipBgCU2+1x4Lb9p3lPKIrU5SJPfMOpnJFhIqmKreQRS8xp8Nt KDJJUwQoO6s4zj1T9J8e3jWfGadJP4M/KHtemJqEMeXbOU8ZEL3Y8EZkngpUAbykbp1Y lpksg8J5hmtUJazI93qs6ZS/qmWpCLpFdPWY+t+ZFj/A3/YJvlZvMfFowNRuakdgflCd 5benm8TImNJbCoJKgxVIk63inpvBy1YCfmFyA1+9+y/vYG7J8ALTh5lRUEXz7/ZDDyc6 iXIxrV1dKbxwCz30KsVFfhIuNoid6Rlclm7IJpWPmNjVfmLuJ8acPaepkuzEIlGdRuJJ Bp/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Oi01b9O2; 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 a12si9291174pgk.291.2019.02.11.04.28.46; Mon, 11 Feb 2019 04:29:03 -0800 (PST) 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; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Oi01b9O2; 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 S1727870AbfBKM2A (ORCPT + 99 others); Mon, 11 Feb 2019 07:28:00 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54880 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727641AbfBKM0k (ORCPT ); Mon, 11 Feb 2019 07:26:40 -0500 Received: by mail-wm1-f68.google.com with SMTP id a62so17478296wmh.4 for ; Mon, 11 Feb 2019 04:26:38 -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=Oi01b9O2eyTyX1bGRkpG8h3IZVJ+EgOpgzZ3ZFLpBndmmelie2v7Hbdhv680lkbfM+ Go1MFymRNpZ58w3U8hGFRd3bPg2UoFfu40QbClVU04uxnM0NbnPe/b3ksjCImlMNDqf3 anuWBVaQOwHlltiNdPh++VYEztepEUsM2TVsQfcAQhnrdqpGjijds+08I11HKejfkE75 Po6WpeFKwo3HFu5K1yQDcDANIjVVBc0g+qbpQsQnxS1DvkkhIVJAEa7U/+ZPkofeMSSx cxp1YYydFJb4q3Wbz1mVLq5PXwait2/qgOpnPJwreNd6GoK41lxrFCWiban+KwiDrXKh Y3qw== 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=C0bNMtugDw06SnP+LfXJsYWuvOIgusGnAQXVgEOJEcrPxitDTmX7T2MklGdvX8/Sjr O74Y1kfD1x94NrgprafO71Qg1ps+WIEOaBQT70bYJKFHV9sE4YW5iv9lp1ywWrTkbFnH cpQxmYpnBGrArn8eBL2YH6DcFRdtvSgW8CZNI2hHu7j43vT+vMBVxhXh0MFPWf2/dqIp +hpm3H636QpDS5xAIoV1jmQu7cx1myIbu+ypJ9nIexTtWJHAu2tZILTNKGfASkwzUCOH 0RIvBmiEt8v/mHfMjEDUXzmLavDVlermhXIU9xCUdYyYMl8q1/lp6AOefS4NCHRZByvg 8wFg== X-Gm-Message-State: AHQUAuYjHc93hGaS55EU1xQ5/AjG1BCfBCX3vF3tCULOifXg60ZNNuVa POMhUAkKZchhJDLv3M8lZ8EOhw== X-Received: by 2002:a1c:c904:: with SMTP id f4mr741017wmb.42.1549887997853; Mon, 11 Feb 2019 04:26:37 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id l20sm19494321wrb.93.2019.02.11.04.26.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 04:26:37 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Thomas Gleixner , Jason Cooper , Marc Zyngier , David Lechner Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [RESEND PATCH v2 20/33] ARM: davinci: cp-intc: remove cp_intc.h Date: Mon, 11 Feb 2019 13:25:53 +0100 Message-Id: <20190211122606.8662-21-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211122606.8662-1-brgl@bgdev.pl> References: <20190211122606.8662-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 { -- 2.20.1