public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Sekhar Nori <nsekhar@ti.com>, Kevin Hilman <khilman@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [PATCH 33/35] ARM: davinci: prepare to remove mach/irqs.h
Date: Thu, 31 Jan 2019 14:39:26 +0100	[thread overview]
Message-ID: <20190131133928.17985-34-brgl@bgdev.pl> (raw)
In-Reply-To: <20190131133928.17985-1-brgl@bgdev.pl>

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Since we now select SPARSE_IRQ in davinci, the mach/irqs.h header is
no longer included from asm/irq.h. All interrupt numbers for devices
should be defined as platform device resources. Let's prepare for the
removal of mach/irqs.h by moving all defines that we want to keep to
relevant headers (davinci.h, common.h) and replacing others with
simple literals.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/board-da830-evm.c     |  2 +-
 arch/arm/mach-davinci/board-da850-evm.c     |  4 ++--
 arch/arm/mach-davinci/board-dm644x-evm.c    |  2 +-
 arch/arm/mach-davinci/board-dm646x-evm.c    |  2 +-
 arch/arm/mach-davinci/da830.c               |  2 +-
 arch/arm/mach-davinci/da850.c               |  2 +-
 arch/arm/mach-davinci/davinci.h             |  2 ++
 arch/arm/mach-davinci/include/mach/common.h |  5 +++++
 arch/arm/mach-davinci/include/mach/irqs.h   | 18 ------------------
 9 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index b3a0148f7f1a..950e98e4eda5 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -488,7 +488,7 @@ static int da830_evm_ui_expander_teardown(struct i2c_client *client, int gpio,
 }
 
 static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = {
-	.gpio_base	= DAVINCI_N_GPIO,
+	.gpio_base	= 144,
 	.setup		= da830_evm_ui_expander_setup,
 	.teardown	= da830_evm_ui_expander_teardown,
 };
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index efc9a33da6e1..27acba6fe5f8 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -562,7 +562,7 @@ static int da850_evm_ui_expander_teardown(struct i2c_client *client,
 
 /* assign the baseboard expander's GPIOs after the UI board's */
 #define DA850_UI_EXPANDER_N_GPIOS ARRAY_SIZE(da850_evm_ui_exp)
-#define DA850_BB_EXPANDER_GPIO_BASE (DAVINCI_N_GPIO + DA850_UI_EXPANDER_N_GPIOS)
+#define DA850_BB_EXPANDER_GPIO_BASE (144 + DA850_UI_EXPANDER_N_GPIOS)
 
 enum da850_evm_bb_exp_pins {
 	DA850_EVM_BB_EXP_DEEP_SLEEP_EN = 0,
@@ -735,7 +735,7 @@ static int da850_evm_bb_expander_teardown(struct i2c_client *client,
 }
 
 static struct pca953x_platform_data da850_evm_ui_expander_info = {
-	.gpio_base	= DAVINCI_N_GPIO,
+	.gpio_base	= 144,
 	.setup		= da850_evm_ui_expander_setup,
 	.teardown	= da850_evm_ui_expander_teardown,
 	.names		= da850_evm_ui_exp,
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index f23a29e5116f..d04ce0c206b6 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -310,7 +310,7 @@ static struct platform_device rtc_dev = {
  * I2C GPIO expanders
  */
 
-#define PCF_Uxx_BASE(x)	(DAVINCI_N_GPIO + ((x) * 8))
+#define PCF_Uxx_BASE(x)	(144 + ((x) * 8))
 
 
 /* U2 -- LEDs */
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index ebf07d92224e..2ddc03a95acd 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -333,7 +333,7 @@ static int evm_pcf_teardown(struct i2c_client *client, int gpio,
 }
 
 static struct pcf857x_platform_data pcf_data = {
-	.gpio_base	= DAVINCI_N_GPIO+1,
+	.gpio_base	= 145,
 	.setup		= evm_pcf_setup,
 	.teardown	= evm_pcf_teardown,
 };
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index 9cf9b090efeb..74cbab153e59 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -730,7 +730,7 @@ static const struct davinci_cp_intc_config da830_cp_intc_config = {
 		.end		= DA8XX_CP_INTC_BASE + SZ_8K,
 		.flags		= IORESOURCE_MEM,
 	},
-	.num_irqs		= DA830_N_CP_INTC_IRQ,
+	.num_irqs		= 96,
 };
 
 void __init da830_init_irqs(void)
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index b9ebdcde68eb..644f4eec8d5c 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -658,7 +658,7 @@ static const struct davinci_cp_intc_config da850_cp_intc_config = {
 		.end		= DA8XX_CP_INTC_BASE + SZ_8K,
 		.flags		= IORESOURCE_MEM,
 	},
-	.num_irqs		= DA850_N_CP_INTC_IRQ,
+	.num_irqs		= 101,
 };
 
 void __init da850_init_irqs(void)
diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h
index 49958cc161d7..d5bffd3751f9 100644
--- a/arch/arm/mach-davinci/davinci.h
+++ b/arch/arm/mach-davinci/davinci.h
@@ -39,6 +39,8 @@
 #define DAVINCI_PLL2_BASE		0x01c40c00
 #define DAVINCI_PWR_SLEEP_CNTRL_BASE	0x01c41000
 
+#define DAVINCI_ARM_INTC_BASE		0x01c48000
+
 #define DAVINCI_SYSTEM_MODULE_BASE	0x01c40000
 #define SYSMOD_VDAC_CONFIG		0x2c
 #define SYSMOD_VIDCLKCTL		0x38
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 2b986d32049f..9526e5da0d33 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -17,6 +17,11 @@
 #include <linux/types.h>
 #include <linux/reboot.h>
 
+#include <asm/irq.h>
+
+#define DAVINCI_INTC_START		NR_IRQS
+#define DAVINCI_INTC_IRQ(_irqnum)	(DAVINCI_INTC_START + (_irqnum))
+
 void davinci_timer_init(struct clk *clk);
 
 struct davinci_timer_instance {
diff --git a/arch/arm/mach-davinci/include/mach/irqs.h b/arch/arm/mach-davinci/include/mach/irqs.h
index 317cbc42e5cd..27c9f89f2a7f 100644
--- a/arch/arm/mach-davinci/include/mach/irqs.h
+++ b/arch/arm/mach-davinci/include/mach/irqs.h
@@ -29,12 +29,6 @@
 
 #include <asm/irq.h>
 
-/* Base address */
-#define DAVINCI_ARM_INTC_BASE 0x01C48000
-
-#define DAVINCI_INTC_START		NR_IRQS
-#define DAVINCI_INTC_IRQ(_irqnum)	(DAVINCI_INTC_START + (_irqnum))
-
 /* Interrupt lines */
 #define IRQ_VDINT0       DAVINCI_INTC_IRQ(0)
 #define IRQ_VDINT1       DAVINCI_INTC_IRQ(1)
@@ -100,10 +94,6 @@
 #define IRQ_COMMRX       DAVINCI_INTC_IRQ(62)
 #define IRQ_EMUINT       DAVINCI_INTC_IRQ(63)
 
-#define DAVINCI_N_AINTC_IRQ	64
-
-#define ARCH_TIMER_IRQ IRQ_TINT1_TINT34
-
 /* DaVinci DM6467-specific Interrupts */
 #define IRQ_DM646X_VP_VERTINT0  DAVINCI_INTC_IRQ(0)
 #define IRQ_DM646X_VP_VERTINT1  DAVINCI_INTC_IRQ(1)
@@ -344,8 +334,6 @@
 #define IRQ_DA830_T12CMPINT6_1		DAVINCI_INTC_IRQ(88)
 #define IRQ_DA830_T12CMPINT7_1		DAVINCI_INTC_IRQ(89)
 
-#define DA830_N_CP_INTC_IRQ		96
-
 /* DA850 speicific interrupts */
 #define IRQ_DA850_MPUADDRERR0		DAVINCI_INTC_IRQ(27)
 #define IRQ_DA850_MPUPROTERR0		DAVINCI_INTC_IRQ(27)
@@ -401,10 +389,4 @@
 #define IRQ_DA850_MCBSP1RINT		DAVINCI_INTC_IRQ(99)
 #define IRQ_DA850_MCBSP1XINT		DAVINCI_INTC_IRQ(100)
 
-#define DA850_N_CP_INTC_IRQ		101
-
-/* da850 currently has the most gpio pins (144) */
-#define DAVINCI_N_GPIO			144
-/* da850 currently has the most irqs so use DA850_N_CP_INTC_IRQ */
-
 #endif /* __ASM_ARCH_IRQS_H */
-- 
2.20.1


  parent reply	other threads:[~2019-01-31 13:40 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31 13:38 [PATCH 00/35] ARM: davinci: modernize the irq support Bartosz Golaszewski
2019-01-31 13:38 ` [PATCH 01/35] ARM: davinci: remove intc_host_map from davinci_soc_info struct Bartosz Golaszewski
2019-02-04 21:50   ` David Lechner
2019-02-06  8:32   ` Sekhar Nori
2019-01-31 13:38 ` [PATCH 02/35] ARM: davinci: select GENERIC_IRQ_MULTI_HANDLER Bartosz Golaszewski
2019-02-04 22:02   ` David Lechner
2019-02-06 12:39   ` Sekhar Nori
2019-02-07 15:49     ` Bartosz Golaszewski
2019-02-08  8:59       ` Sekhar Nori
2019-01-31 13:38 ` [PATCH 03/35] ARM: davinci: remove davinci_intc_type Bartosz Golaszewski
2019-02-04 22:04   ` David Lechner
2019-01-31 13:38 ` [PATCH 04/35] ARM: davinci: pull davinci_intc_base into the respective intc drivers Bartosz Golaszewski
2019-02-04 22:06   ` David Lechner
2019-01-31 13:38 ` [PATCH 05/35] ARM: davinci: drop irq defines from default_priorites Bartosz Golaszewski
2019-02-04 22:21   ` David Lechner
2019-02-06 13:03     ` Sekhar Nori
2019-02-06 13:32       ` Bartosz Golaszewski
2019-02-06 14:50         ` Sekhar Nori
2019-02-05  0:20   ` David Lechner
2019-02-05 16:16     ` Bartosz Golaszewski
2019-01-31 13:38 ` [PATCH 06/35] ARM: davinci: wrap interrupt definitions with a macro for SPARSE_IRQ Bartosz Golaszewski
2019-02-04 22:32   ` David Lechner
2019-02-05 16:17     ` Bartosz Golaszewski
2019-01-31 13:39 ` [PATCH 07/35] ARM: davinci: aintc: use irq domain Bartosz Golaszewski
2019-02-04 22:42   ` David Lechner
2019-02-05 16:29     ` Bartosz Golaszewski
2019-02-06 15:08   ` Sekhar Nori
2019-01-31 13:39 ` [PATCH 08/35] ARM: davinci: select SPARSE_IRQ Bartosz Golaszewski
2019-02-04 22:46   ` David Lechner
2019-01-31 13:39 ` [PATCH 09/35] ARM: davinci: aintc: drop GPL license boilerplate Bartosz Golaszewski
2019-01-31 13:39 ` [PATCH 10/35] ARM: davinci: aintc: wrap davinci_irq_init() with a helper Bartosz Golaszewski
2019-02-04 22:51   ` David Lechner
2019-01-31 13:39 ` [PATCH 11/35] ARM: davinci: aintc: use a common prefix for symbols in the driver Bartosz Golaszewski
2019-02-04 22:54   ` David Lechner
2019-01-31 13:39 ` [PATCH 12/35] ARM: davinci: aintc: drop the 00 prefix from register offsets Bartosz Golaszewski
2019-02-04 22:56   ` David Lechner
2019-01-31 13:39 ` [PATCH 13/35] ARM: davinci: aintc: add a new config structure Bartosz Golaszewski
2019-02-04 23:02   ` David Lechner
2019-02-07 13:33   ` Sekhar Nori
2019-01-31 13:39 ` [PATCH 14/35] ARM: davinci: aintc: use the new irqchip config structure in dm* SoCs Bartosz Golaszewski
2019-02-04 23:09   ` David Lechner
2019-01-31 13:39 ` [PATCH 15/35] ARM: davinci: aintc: use the new config structure Bartosz Golaszewski
2019-02-04 23:29   ` David Lechner
2019-01-31 13:39 ` [PATCH 16/35] ARM: davinci: aintc: move timer-specific irq_set_handler() out of irq.c Bartosz Golaszewski
2019-02-04 23:36   ` David Lechner
2019-02-07 12:21   ` Sekhar Nori
2019-01-31 13:39 ` [PATCH 17/35] ARM: davinci: aintc: remove unnecessary includes Bartosz Golaszewski
2019-02-04 23:37   ` David Lechner
2019-01-31 13:39 ` [PATCH 18/35] irqchip: davinci-aintc: move the driver to drivers/irqchip Bartosz Golaszewski
2019-02-04 23:43   ` David Lechner
2019-02-08 16:03     ` Bartosz Golaszewski
2019-01-31 13:39 ` [PATCH 19/35] ARM: davinci: cp-intc: remove cp_intc.h Bartosz Golaszewski
2019-02-04 23:48   ` David Lechner
2019-01-31 13:39 ` [PATCH 20/35] ARM: davinci: cp-intc: add a wrapper around cp_intc_init() Bartosz Golaszewski
2019-02-04 23:50   ` David Lechner
2019-01-31 13:39 ` [PATCH 21/35] ARM: davinci: cp-intc: add a new config structure Bartosz Golaszewski
2019-02-04 23:54   ` David Lechner
2019-01-31 13:39 ` [PATCH 22/35] ARM: davinci: cp-intc: add the new config structures for da8xx SoCs Bartosz Golaszewski
2019-02-04 23:58   ` David Lechner
2019-02-07 13:35   ` Sekhar Nori
2019-01-31 13:39 ` [PATCH 23/35] ARM: davinci: cp-intc: use a common prefix for all symbols Bartosz Golaszewski
2019-02-05  0:01   ` David Lechner
2019-02-07 13:43   ` Sekhar Nori
2019-01-31 13:39 ` [PATCH 24/35] ARM: davinci: cp-intc: convert all hex numbers to lowercase Bartosz Golaszewski
2019-02-05  0:04   ` David Lechner
2019-01-31 13:39 ` [PATCH 25/35] ARM: davinci: cp-intc: use the new-style config structure Bartosz Golaszewski
2019-02-05  0:29   ` David Lechner
2019-02-08 16:27     ` Bartosz Golaszewski
2019-02-07 13:59   ` Sekhar Nori
2019-01-31 13:39 ` [PATCH 26/35] ARM: davinci: cp-intc: improve coding style Bartosz Golaszewski
2019-02-05  0:35   ` David Lechner
2019-01-31 13:39 ` [PATCH 27/35] ARM: davinci: cp-intc: unify error handling Bartosz Golaszewski
2019-02-05  0:37   ` David Lechner
2019-01-31 13:39 ` [PATCH 28/35] ARM: davinci: cp-intc: remove unneeded include Bartosz Golaszewski
2019-02-05  0:39   ` David Lechner
2019-01-31 13:39 ` [PATCH 29/35] ARM: davinci: cp-intc: drop GPL license boilerplate Bartosz Golaszewski
2019-02-05  0:41   ` David Lechner
2019-01-31 13:39 ` [PATCH 30/35] ARM: davinci: cp-intc: remove redundant comments Bartosz Golaszewski
2019-02-05  0:42   ` David Lechner
2019-01-31 13:39 ` [PATCH 31/35] irqchip: davinci-cp-intc: move the driver to drivers/irqchip Bartosz Golaszewski
2019-02-05  0:44   ` David Lechner
2019-01-31 13:39 ` [PATCH 32/35] ARM: davinci: remove intc related fields from davinci_soc_info Bartosz Golaszewski
2019-02-05  0:48   ` David Lechner
2019-02-07 14:04   ` Sekhar Nori
2019-02-08 16:41     ` Bartosz Golaszewski
2019-01-31 13:39 ` Bartosz Golaszewski [this message]
2019-02-07 14:07   ` [PATCH 33/35] ARM: davinci: prepare to remove mach/irqs.h Sekhar Nori
2019-01-31 13:39 ` [PATCH 34/35] ARM: davinci: stop using defines from mach/irqs.h Bartosz Golaszewski
2019-02-05  1:05   ` David Lechner
2019-01-31 13:39 ` [PATCH 35/35] ARM: davinci: remove mach/irqs.h Bartosz Golaszewski
2019-02-05  1:06   ` David Lechner
2019-02-04 21:49 ` [PATCH 00/35] ARM: davinci: modernize the irq support David Lechner
2019-02-05 16:11   ` Bartosz Golaszewski
2019-02-08 11:43     ` Sekhar Nori
2019-02-08 12:27       ` Bartosz Golaszewski
2019-02-08 12:29         ` Sekhar Nori
2019-02-07 15:24 ` Sekhar Nori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190131133928.17985-34-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=bgolaszewski@baylibre.com \
    --cc=jason@lakedaemon.net \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=nsekhar@ti.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox