Skip to contentSkip to conversation

ARM: shmobile: Rework include path (Try 2, Part 1)

PATCH Superseded Magnus Damm 4 participants 12 messages May 20, 2014 – Jun 6, 2014

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
author maintainer
#2 lore raw

PATCH 2/8 ARM: shmobile: Move dma-register.h

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Change location of dma-register.h so it can be used as #include "dma-register.h" instead of the old style #include <mach/dma-register.h>.

---

This DMAC header and the DMAC abstraction needs a rework, badly. It is also not specific to ARM so it is a mystery to me why it ended up under arch/arm...

 arch/arm/mach-shmobile/dma-register.h              |   84 ++++++++++++++++++++
 arch/arm/mach-shmobile/include/mach/dma-register.h |   84 --------------------
 arch/arm/mach-shmobile/setup-r8a73a4.c             |    2 
 arch/arm/mach-shmobile/setup-r8a7740.c             |    2 
 arch/arm/mach-shmobile/setup-r8a7790.c             |    2 
 arch/arm/mach-shmobile/setup-sh7372.c              |    2 
 arch/arm/mach-shmobile/setup-sh73a0.c              |    2 
 7 files changed, 89 insertions(+), 89 deletions(-)
arch/arm/mach-shmobile/dma-register.h new file +84 -0
@@ -0,0 +1,84 @@
+/*
+ * SH-ARM CPU-specific DMA definitions, used by both DMA drivers
+ *
+ * Copyright (C) 2012 Renesas Solutions Corp
+ *
+ * Kuninori Morimoto <[email protected]>
+ *
+ * Based on arch/sh/include/cpu-sh4/cpu/dma-register.h
+ * Copyright (C) 2010 Guennadi Liakhovetski <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef DMA_REGISTER_H
+#define DMA_REGISTER_H
+
+/*
+ *		Direct Memory Access Controller
+ */
+
+/* Transmit sizes and respective CHCR register values */
+enum {
+	XMIT_SZ_8BIT		= 0,
+	XMIT_SZ_16BIT		= 1,
+	XMIT_SZ_32BIT		= 2,
+	XMIT_SZ_64BIT		= 7,
+	XMIT_SZ_128BIT		= 3,
+	XMIT_SZ_256BIT		= 4,
+	XMIT_SZ_512BIT		= 5,
+};
+
+/* log2(size / 8) - used to calculate number of transfers */
+static const unsigned int dma_ts_shift[] = {
+	[XMIT_SZ_8BIT]		= 0,
+	[XMIT_SZ_16BIT]		= 1,
+	[XMIT_SZ_32BIT]		= 2,
+	[XMIT_SZ_64BIT]		= 3,
+	[XMIT_SZ_128BIT]	= 4,
+	[XMIT_SZ_256BIT]	= 5,
+	[XMIT_SZ_512BIT]	= 6,
+};
+
+#define TS_LOW_BIT	0x3 /* --xx */
+#define TS_HI_BIT	0xc /* xx-- */
+
+#define TS_LOW_SHIFT	(3)
+#define TS_HI_SHIFT	(20 - 2)	/* 2 bits for shifted low TS */
+
+#define TS_INDEX2VAL(i) \
+	((((i) & TS_LOW_BIT) << TS_LOW_SHIFT) |\
+	 (((i) & TS_HI_BIT)  << TS_HI_SHIFT))
+
+#define CHCR_TX(xmit_sz) (DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL((xmit_sz)))
+#define CHCR_RX(xmit_sz) (DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL((xmit_sz)))
+
+
+/*
+ *		USB High-Speed DMAC
+ */
+/* Transmit sizes and respective CHCR register values */
+enum {
+	USBTS_XMIT_SZ_8BYTE		= 0,
+	USBTS_XMIT_SZ_16BYTE		= 1,
+	USBTS_XMIT_SZ_32BYTE		= 2,
+};
+
+/* log2(size / 8) - used to calculate number of transfers */
+static const unsigned int dma_usbts_shift[] = {
+	[USBTS_XMIT_SZ_8BYTE]	= 3,
+	[USBTS_XMIT_SZ_16BYTE]	= 4,
+	[USBTS_XMIT_SZ_32BYTE]	= 5,
+};
+
+#define USBTS_LOW_BIT	0x3 /* --xx */
+#define USBTS_HI_BIT	0x0 /* ---- */
+
+#define USBTS_LOW_SHIFT	6
+#define USBTS_HI_SHIFT	0
+
+#define USBTS_INDEX2VAL(i) (((i) & 3) << 6)
+
+#endif /* DMA_REGISTER_H */
arch/arm/mach-shmobile/include/mach/dma-register.h deleted +0 -84

84 lines not on this page · raw message

arch/arm/mach-shmobile/setup-r8a73a4.c +1 -1
@@ -25,10 +25,10 @@
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
 #include <mach/common.h>
-#include <mach/dma-register.h>
 #include <mach/irqs.h>
 #include <mach/r8a73a4.h>
 #include <asm/mach/arch.h>
+#include "dma-register.h"
 
 static const struct resource pfc_resources[] = {
 	DEFINE_RES_MEM(0xe6050000, 0x9000),
arch/arm/mach-shmobile/setup-r8a7740.c +1 -1
@@ -31,7 +31,6 @@
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
 #include <linux/platform_data/sh_ipmmu.h>
-#include <mach/dma-register.h>
 #include <mach/r8a7740.h>
 #include <mach/pm-rmobile.h>
 #include <mach/common.h>
@@ -40,6 +39,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include "dma-register.h"
 
 static struct map_desc r8a7740_io_desc[] __initdata = {
 	 /*
arch/arm/mach-shmobile/setup-r8a7790.c +1 -1
@@ -27,10 +27,10 @@
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
 #include <mach/common.h>
-#include <mach/dma-register.h>
 #include <mach/irqs.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
+#include "dma-register.h"
 
 /* Audio-DMAC */
 #define AUDIO_DMAC_SLAVE(_id, _addr, t, r)			\
arch/arm/mach-shmobile/setup-sh7372.c +1 -1
@@ -33,7 +33,6 @@
 #include <linux/pm_domain.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_data/sh_ipmmu.h>
-#include <mach/dma-register.h>
 #include <mach/irqs.h>
 #include <mach/sh7372.h>
 #include <mach/common.h>
@@ -41,6 +40,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include "dma-register.h"
 
 static struct map_desc sh7372_io_desc[] __initdata = {
 	/* create a 1:1 entity map for 0xe6xxxxxx
arch/arm/mach-shmobile/setup-sh73a0.c +1 -1
@@ -32,7 +32,6 @@
 #include <linux/sh_timer.h>
 #include <linux/platform_data/sh_ipmmu.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
-#include <mach/dma-register.h>
 #include <mach/irqs.h>
 #include <mach/sh73a0.h>
 #include <mach/common.h>
@@ -40,6 +39,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include "dma-register.h"
 
 static struct map_desc sh73a0_io_desc[] __initdata = {
 	/* create a 1:1 entity map for 0xe6xxxxxx
author maintainer
#3 lore raw

PATCH 3/8 ARM: shmobile: Move clock.h

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Change location of clock.h so it can be used as #include "clock.h" instead of the old style #include <mach/clock.h>.

---

 arch/arm/mach-shmobile/board-genmai-reference.c  |    2 
 arch/arm/mach-shmobile/board-koelsch-reference.c |    2 
 arch/arm/mach-shmobile/board-lager-reference.c   |    2 
 arch/arm/mach-shmobile/board-marzen-reference.c  |    2 
 arch/arm/mach-shmobile/clock-r8a73a4.c           |    2 
 arch/arm/mach-shmobile/clock-r8a7740.c           |    2 
 arch/arm/mach-shmobile/clock-r8a7778.c           |    2 
 arch/arm/mach-shmobile/clock-r8a7779.c           |    2 
 arch/arm/mach-shmobile/clock-r8a7790.c           |    2 
 arch/arm/mach-shmobile/clock-r8a7791.c           |    2 
 arch/arm/mach-shmobile/clock-sh7372.c            |    2 
 arch/arm/mach-shmobile/clock-sh73a0.c            |    2 
 arch/arm/mach-shmobile/clock.c                   |    4 -
 arch/arm/mach-shmobile/clock.h                   |   56 ++++++++++++++++++++++
 arch/arm/mach-shmobile/include/mach/clock.h      |   56 ----------------------
 15 files changed, 70 insertions(+), 70 deletions(-)
arch/arm/mach-shmobile/board-genmai-reference.c +1 -1
@@ -20,11 +20,11 @@
 
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
-#include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/r7s72100.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "clock.h"
 
 /*
  * This is a really crude hack to provide clkdev support to platform
arch/arm/mach-shmobile/board-koelsch-reference.c +1 -1
@@ -23,12 +23,12 @@
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
 #include <linux/platform_data/rcar-du.h>
-#include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <mach/rcar-gen2.h>
 #include <mach/r8a7791.h>
 #include <asm/mach/arch.h>
+#include "clock.h"
 
 /* DU */
 static struct rcar_du_encoder_data koelsch_du_encoders[] = {
arch/arm/mach-shmobile/board-lager-reference.c +1 -1
@@ -22,12 +22,12 @@
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <linux/platform_data/rcar-du.h>
-#include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <mach/rcar-gen2.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
+#include "clock.h"
 
 /* DU */
 static struct rcar_du_encoder_data lager_du_encoders[] = {
arch/arm/mach-shmobile/board-marzen-reference.c +1 -1
@@ -23,11 +23,11 @@
 #include <linux/clocksource.h>
 #include <linux/of_platform.h>
 #include <mach/r8a7779.h>
-#include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/irqs.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
+#include "clock.h"
 
 static void __init marzen_init_timer(void)
 {
arch/arm/mach-shmobile/clock-r8a73a4.c +1 -1
@@ -22,8 +22,8 @@
 #include <linux/kernel.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/clock.h>
 #include <mach/common.h>
+#include "clock.h"
 
 #define CPG_BASE 0xe6150000
 #define CPG_LEN 0x270
arch/arm/mach-shmobile/clock-r8a7740.c +1 -1
@@ -22,9 +22,9 @@
 #include <linux/io.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/r8a7740.h>
+#include "clock.h"
 
 /*
  *        |  MDx  |  XTAL1/EXTAL1   |  System   | EXTALR |
arch/arm/mach-shmobile/clock-r8a7778.c +1 -1
@@ -39,8 +39,8 @@
 #include <linux/io.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/clock.h>
 #include <mach/common.h>
+#include "clock.h"
 
 #define MSTPCR0		IOMEM(0xffc80030)
 #define MSTPCR1		IOMEM(0xffc80034)
arch/arm/mach-shmobile/clock-r8a7779.c +1 -1
@@ -24,9 +24,9 @@
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
 #include <linux/sh_timer.h>
-#include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/r8a7779.h>
+#include "clock.h"
 
 /*
  *		MD1 = 1			MD1 = 0
arch/arm/mach-shmobile/clock-r8a7790.c +1 -1
@@ -22,9 +22,9 @@
 #include <linux/kernel.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/r8a7790.h>
+#include "clock.h"
 
 /*
  *   MD		EXTAL		PLL0	PLL1	PLL3
arch/arm/mach-shmobile/clock-r8a7791.c +1 -1
@@ -23,9 +23,9 @@
 #include <linux/kernel.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/rcar-gen2.h>
+#include "clock.h"
 
 /*
  *   MD		EXTAL		PLL0	PLL1	PLL3
arch/arm/mach-shmobile/clock-sh7372.c +1 -1
@@ -21,8 +21,8 @@
 #include <linux/io.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/clock.h>
 #include <mach/common.h>
+#include "clock.h"
 
 /* SH7372 registers */
 #define FRQCRA		IOMEM(0xe6150000)
arch/arm/mach-shmobile/clock-sh73a0.c +1 -1
@@ -22,8 +22,8 @@
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
 #include <asm/processor.h>
-#include <mach/clock.h>
 #include <mach/common.h>
+#include "clock.h"
 
 #define FRQCRA		IOMEM(0xe6150000)
 #define FRQCRB		IOMEM(0xe6150004)
arch/arm/mach-shmobile/clock.c +2 -2
@@ -25,7 +25,7 @@
 #ifdef CONFIG_COMMON_CLK
 #include <linux/clk.h>
 #include <linux/clkdev.h>
-#include <mach/clock.h>
+#include "clock.h"
 
 void __init shmobile_clk_workaround(const struct clk_name *clks,
 				    int nr_clks, bool enable)
@@ -49,8 +49,8 @@ void __init shmobile_clk_workaround(cons
 #else /* CONFIG_COMMON_CLK */
 #include <linux/sh_clk.h>
 #include <linux/export.h>
-#include <mach/clock.h>
 #include <mach/common.h>
+#include "clock.h"
 
 unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk)
 {
arch/arm/mach-shmobile/clock.h new file +56 -0

56 lines not on this page · raw message

arch/arm/mach-shmobile/include/mach/clock.h deleted +0 -56

56 lines not on this page · raw message

author maintainer
#4 lore raw

PATCH 4/8 ARM: shmobile: Move most of irqs.h, keep some for pinctl

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Move most of irqs.h so it can be used as #include "irqs.h" instead of the old style #include <mach/irqs.h>.

Legacy code in drivers/pinctrl needs more work to get rid of the "mach" portion of the include path, so some part is left in the original location.

---

 arch/arm/mach-shmobile/board-ape6evm.c           |    2 +-
 arch/arm/mach-shmobile/board-armadillo800eva.c   |    3 +--
 arch/arm/mach-shmobile/board-bockw.c             |    2 +-
 arch/arm/mach-shmobile/board-genmai.c            |    2 +-
 arch/arm/mach-shmobile/board-koelsch-reference.c |    2 +-
 arch/arm/mach-shmobile/board-koelsch.c           |    2 +-
 arch/arm/mach-shmobile/board-kzm9g.c             |    2 +-
 arch/arm/mach-shmobile/board-lager-reference.c   |    2 +-
 arch/arm/mach-shmobile/board-lager.c             |    2 +-
 arch/arm/mach-shmobile/board-mackerel.c          |    5 +----
 arch/arm/mach-shmobile/board-marzen-reference.c  |    2 +-
 arch/arm/mach-shmobile/board-marzen.c            |    2 +-
 arch/arm/mach-shmobile/include/mach/irqs.h       |   17 ++---------------
 arch/arm/mach-shmobile/intc-sh7372.c             |    2 +-
 arch/arm/mach-shmobile/intc-sh73a0.c             |    2 +-
 arch/arm/mach-shmobile/irqs.h                    |   21 +++++++++++++++++++++
 arch/arm/mach-shmobile/setup-r7s72100.c          |    2 +-
 arch/arm/mach-shmobile/setup-r8a73a4.c           |    2 +-
 arch/arm/mach-shmobile/setup-r8a7740.c           |    2 +-
 arch/arm/mach-shmobile/setup-r8a7778.c           |    2 +-
 arch/arm/mach-shmobile/setup-r8a7779.c           |    2 +-
 arch/arm/mach-shmobile/setup-r8a7790.c           |    2 +-
 arch/arm/mach-shmobile/setup-r8a7791.c           |    2 +-
 arch/arm/mach-shmobile/setup-sh7372.c            |    2 +-
 arch/arm/mach-shmobile/setup-sh73a0.c            |    2 +-
 25 files changed, 46 insertions(+), 42 deletions(-)
arch/arm/mach-shmobile/board-ape6evm.c +1 -1
@@ -34,10 +34,10 @@
 #include <linux/sh_clk.h>
 #include <linux/smsc911x.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r8a73a4.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "irqs.h"
 
 /* LEDS */
 static struct gpio_led ape6evm_leds[] = {
arch/arm/mach-shmobile/board-armadillo800eva.c +1 -2
@@ -46,7 +46,6 @@
 #include <linux/i2c-gpio.h>
 #include <linux/reboot.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r8a7740.h>
 #include <media/mt9t112.h>
 #include <media/sh_mobile_ceu.h>
@@ -61,7 +60,7 @@
 #include <video/sh_mobile_hdmi.h>
 #include <sound/sh_fsi.h>
 #include <sound/simple_card.h>
-
+#include "irqs.h"
 #include "sh-gpio.h"
 
 /*
arch/arm/mach-shmobile/board-bockw.c +1 -1
@@ -36,11 +36,11 @@
 #include <linux/usb/renesas_usbhs.h>
 #include <media/soc_camera.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r8a7778.h>
 #include <asm/mach/arch.h>
 #include <sound/rcar_snd.h>
 #include <sound/simple_card.h>
+#include "irqs.h"
 
 #define FPGA	0x18200000
 #define IRQ0MR	0x30
arch/arm/mach-shmobile/board-genmai.c +1 -1
@@ -26,10 +26,10 @@
 #include <linux/spi/rspi.h>
 #include <linux/spi/spi.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r7s72100.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "irqs.h"
 
 /* Ether */
 static const struct sh_eth_plat_data ether_pdata __initconst = {
arch/arm/mach-shmobile/board-koelsch-reference.c +1 -1
@@ -24,11 +24,11 @@
 #include <linux/of_platform.h>
 #include <linux/platform_data/rcar-du.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/rcar-gen2.h>
 #include <mach/r8a7791.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
+#include "irqs.h"
 
 /* DU */
 static struct rcar_du_encoder_data koelsch_du_encoders[] = {
arch/arm/mach-shmobile/board-koelsch.c +1 -1
@@ -46,11 +46,11 @@
 #include <linux/spi/rspi.h>
 #include <linux/spi/spi.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r8a7791.h>
 #include <mach/rcar-gen2.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "irqs.h"
 
 /* DU */
 static struct rcar_du_encoder_data koelsch_du_encoders[] = {
arch/arm/mach-shmobile/board-kzm9g.c +1 -1
@@ -43,13 +43,13 @@
 #include <linux/videodev2.h>
 #include <sound/sh_fsi.h>
 #include <sound/simple_card.h>
-#include <mach/irqs.h>
 #include <mach/sh73a0.h>
 #include <mach/common.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <video/sh_mobile_lcdc.h>
+#include "irqs.h"
 
 /*
  * external GPIO
arch/arm/mach-shmobile/board-lager-reference.c +1 -1
@@ -23,11 +23,11 @@
 #include <linux/of_platform.h>
 #include <linux/platform_data/rcar-du.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/rcar-gen2.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
+#include "irqs.h"
 
 /* DU */
 static struct rcar_du_encoder_data lager_du_encoders[] = {
arch/arm/mach-shmobile/board-lager.c +1 -1
@@ -46,7 +46,6 @@
 #include <linux/usb/phy.h>
 #include <linux/usb/renesas_usbhs.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r8a7790.h>
 #include <media/soc_camera.h>
 #include <asm/mach-types.h>
@@ -58,6 +57,7 @@
 #include <linux/spi/spi.h>
 #include <sound/rcar_snd.h>
 #include <sound/simple_card.h>
+#include "irqs.h"
 
 /*
  * SSI-AK4643
arch/arm/mach-shmobile/board-mackerel.c +1 -4
@@ -57,14 +57,11 @@
 #include <media/soc_camera_platform.h>
 #include <sound/sh_fsi.h>
 #include <sound/simple_card.h>
-
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/sh7372.h>
-
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
-
+#include "irqs.h"
 #include "sh-gpio.h"
 
 /*
arch/arm/mach-shmobile/board-marzen-reference.c +1 -1
@@ -24,10 +24,10 @@
 #include <linux/of_platform.h>
 #include <mach/r8a7779.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
+#include "irqs.h"
 
 static void __init marzen_init_timer(void)
 {
arch/arm/mach-shmobile/board-marzen.c +1 -1
@@ -44,10 +44,10 @@
 #include <media/soc_camera.h>
 #include <mach/r8a7779.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/traps.h>
+#include "irqs.h"
 
 /* Fixed 3.3V regulator to be used by SDHI0 */
 static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
arch/arm/mach-shmobile/include/mach/irqs.h +2 -15
@@ -1,24 +1,11 @@
 #ifndef __ASM_MACH_IRQS_H
 #define __ASM_MACH_IRQS_H
 
-#include <linux/sh_intc.h>
-
-/* GIC */
-#define gic_spi(nr)		((nr) + 32)
-#define gic_iid(nr)		(nr) /* ICCIAR / interrupt ID */
-
-/* INTCS */
-#define INTCS_VECT_BASE		0x3400
-#define INTCS_VECT(n, vect)	INTC_VECT((n), INTCS_VECT_BASE + (vect))
-#define intcs_evt2irq(evt)	evt2irq(INTCS_VECT_BASE + (evt))
+/* Stuck here until drivers/pinctl/sh-pfc gets rid of legacy code */
 
 /* External IRQ pins */
 #define IRQPIN_BASE		2000
 #define irq_pin(nr)		((nr) + IRQPIN_BASE)
 
-/* GPIO IRQ */
-#define _GPIO_IRQ_BASE		2500
-#define GPIO_IRQ_BASE(x)	(_GPIO_IRQ_BASE + (32 * x))
-#define GPIO_IRQ(x, y)		(_GPIO_IRQ_BASE + (32 * x) + y)
-
 #endif /* __ASM_MACH_IRQS_H */
+
arch/arm/mach-shmobile/intc-sh7372.c +1 -1
@@ -22,10 +22,10 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/io.h>
-#include <mach/irqs.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include "intc.h"
+#include "irqs.h"
 
 enum {
 	UNUSED_INTCA = 0,
arch/arm/mach-shmobile/intc-sh73a0.c +1 -1
@@ -24,11 +24,11 @@
 #include <linux/io.h>
 #include <linux/irqchip.h>
 #include <linux/irqchip/arm-gic.h>
-#include <mach/irqs.h>
 #include <mach/sh73a0.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include "intc.h"
+#include "irqs.h"
 
 enum {
 	UNUSED = 0,
arch/arm/mach-shmobile/irqs.h new file +21 -0
@@ -0,0 +1,21 @@
+#ifndef __SHMOBILE_IRQS_H
+#define __SHMOBILE_IRQS_H
+
+#include <linux/sh_intc.h>
+#include <mach/irqs.h>
+
+/* GIC */
+#define gic_spi(nr)		((nr) + 32)
+#define gic_iid(nr)		(nr) /* ICCIAR / interrupt ID */
+
+/* INTCS */
+#define INTCS_VECT_BASE		0x3400
+#define INTCS_VECT(n, vect)	INTC_VECT((n), INTCS_VECT_BASE + (vect))
+#define intcs_evt2irq(evt)	evt2irq(INTCS_VECT_BASE + (evt))
+
+/* GPIO IRQ */
+#define _GPIO_IRQ_BASE		2500
+#define GPIO_IRQ_BASE(x)	(_GPIO_IRQ_BASE + (32 * x))
+#define GPIO_IRQ(x, y)		(_GPIO_IRQ_BASE + (32 * x) + y)
+
+#endif /* __SHMOBILE_IRQS_H */
arch/arm/mach-shmobile/setup-r7s72100.c +1 -1
@@ -23,9 +23,9 @@
 #include <linux/of_platform.h>
 #include <linux/sh_timer.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r7s72100.h>
 #include <asm/mach/arch.h>
+#include "irqs.h"
 
 static struct resource mtu2_resources[] __initdata = {
 	DEFINE_RES_MEM(0xfcff0000, 0x400),
arch/arm/mach-shmobile/setup-r8a73a4.c +1 -1
@@ -25,10 +25,10 @@
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r8a73a4.h>
 #include <asm/mach/arch.h>
 #include "dma-register.h"
+#include "irqs.h"
 
 static const struct resource pfc_resources[] = {
 	DEFINE_RES_MEM(0xe6050000, 0x9000),
arch/arm/mach-shmobile/setup-r8a7740.c +1 -1
@@ -34,12 +34,12 @@
 #include <mach/r8a7740.h>
 #include <mach/pm-rmobile.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include "dma-register.h"
+#include "irqs.h"
 
 static struct map_desc r8a7740_io_desc[] __initdata = {
 	 /*
arch/arm/mach-shmobile/setup-r8a7778.c +1 -1
@@ -37,11 +37,11 @@
 #include <linux/usb/ehci_pdriver.h>
 #include <linux/usb/ohci_pdriver.h>
 #include <linux/dma-mapping.h>
-#include <mach/irqs.h>
 #include <mach/r8a7778.h>
 #include <mach/common.h>
 #include <asm/mach/arch.h>
 #include <asm/hardware/cache-l2x0.h>
+#include "irqs.h"
 
 /* SCIF */
 #define R8A7778_SCIF(index, baseaddr, irq)			\
arch/arm/mach-shmobile/setup-r8a7779.c +1 -1
@@ -40,7 +40,6 @@
 #include <linux/usb/ehci_pdriver.h>
 #include <linux/usb/ohci_pdriver.h>
 #include <linux/pm_runtime.h>
-#include <mach/irqs.h>
 #include <mach/r8a7779.h>
 #include <mach/common.h>
 #include <asm/mach-types.h>
@@ -48,6 +47,7 @@
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
 #include <asm/hardware/cache-l2x0.h>
+#include "irqs.h"
 
 static struct map_desc r8a7779_io_desc[] __initdata = {
 	/* 2M entity map for 0xf0000000 (MPCORE) */
arch/arm/mach-shmobile/setup-r8a7790.c +1 -1
@@ -27,10 +27,10 @@
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
 #include "dma-register.h"
+#include "irqs.h"
 
 /* Audio-DMAC */
 #define AUDIO_DMAC_SLAVE(_id, _addr, t, r)			\
arch/arm/mach-shmobile/setup-r8a7791.c +1 -1
@@ -27,10 +27,10 @@
 #include <linux/serial_sci.h>
 #include <linux/sh_timer.h>
 #include <mach/common.h>
-#include <mach/irqs.h>
 #include <mach/r8a7791.h>
 #include <mach/rcar-gen2.h>
 #include <asm/mach/arch.h>
+#include "irqs.h"
 
 static const struct resource pfc_resources[] __initconst = {
 	DEFINE_RES_MEM(0xe6060000, 0x250),
arch/arm/mach-shmobile/setup-sh7372.c +1 -1
@@ -33,7 +33,6 @@
 #include <linux/pm_domain.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_data/sh_ipmmu.h>
-#include <mach/irqs.h>
 #include <mach/sh7372.h>
 #include <mach/common.h>
 #include <asm/mach/map.h>
@@ -41,6 +40,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include "dma-register.h"
+#include "irqs.h"
 
 static struct map_desc sh7372_io_desc[] __initdata = {
 	/* create a 1:1 entity map for 0xe6xxxxxx
arch/arm/mach-shmobile/setup-sh73a0.c +1 -1
@@ -32,7 +32,6 @@
 #include <linux/sh_timer.h>
 #include <linux/platform_data/sh_ipmmu.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
-#include <mach/irqs.h>
 #include <mach/sh73a0.h>
 #include <mach/common.h>
 #include <asm/mach-types.h>
@@ -40,6 +39,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include "dma-register.h"
+#include "irqs.h"
 
 static struct map_desc sh73a0_io_desc[] __initdata = {
 	/* create a 1:1 entity map for 0xe6xxxxxx
author maintainer
#5 lore raw

PATCH 5/8 ARM: shmobile: Move common.h

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Move most of common.h so it can be used as #include "common.h" instead of the old style #include <mach/common.h>.

---

 arch/arm/mach-shmobile/board-ape6evm-reference.c         |    2 
 arch/arm/mach-shmobile/board-ape6evm.c                   |    2 
 arch/arm/mach-shmobile/board-armadillo800eva-reference.c |    2 
 arch/arm/mach-shmobile/board-armadillo800eva.c           |    2 
 arch/arm/mach-shmobile/board-bockw-reference.c           |    2 
 arch/arm/mach-shmobile/board-bockw.c                     |    2 
 arch/arm/mach-shmobile/board-genmai-reference.c          |    2 
 arch/arm/mach-shmobile/board-genmai.c                    |    2 
 arch/arm/mach-shmobile/board-koelsch-reference.c         |    2 
 arch/arm/mach-shmobile/board-koelsch.c                   |    2 
 arch/arm/mach-shmobile/board-kzm9g-reference.c           |    2 
 arch/arm/mach-shmobile/board-kzm9g.c                     |    2 
 arch/arm/mach-shmobile/board-lager-reference.c           |    2 
 arch/arm/mach-shmobile/board-lager.c                     |    2 
 arch/arm/mach-shmobile/board-mackerel.c                  |    2 
 arch/arm/mach-shmobile/board-marzen-reference.c          |    2 
 arch/arm/mach-shmobile/board-marzen.c                    |    2 
 arch/arm/mach-shmobile/clock-r7s72100.c                  |    2 
 arch/arm/mach-shmobile/clock-r8a73a4.c                   |    2 
 arch/arm/mach-shmobile/clock-r8a7740.c                   |    2 
 arch/arm/mach-shmobile/clock-r8a7778.c                   |    2 
 arch/arm/mach-shmobile/clock-r8a7779.c                   |    2 
 arch/arm/mach-shmobile/clock-r8a7790.c                   |    2 
 arch/arm/mach-shmobile/clock-r8a7791.c                   |    2 
 arch/arm/mach-shmobile/clock-sh7372.c                    |    2 
 arch/arm/mach-shmobile/clock-sh73a0.c                    |    2 
 arch/arm/mach-shmobile/clock.c                           |    2 
 arch/arm/mach-shmobile/common.h                          |   56 ++++++++++++++
 arch/arm/mach-shmobile/console.c                         |    2 
 arch/arm/mach-shmobile/include/mach/common.h             |   56 --------------
 arch/arm/mach-shmobile/platsmp-apmu.c                    |    2 
 arch/arm/mach-shmobile/platsmp-scu.c                     |    2 
 arch/arm/mach-shmobile/platsmp.c                         |    2 
 arch/arm/mach-shmobile/pm-r8a7740.c                      |    2 
 arch/arm/mach-shmobile/pm-r8a7779.c                      |    2 
 arch/arm/mach-shmobile/pm-sh7372.c                       |    2 
 arch/arm/mach-shmobile/pm-sh73a0.c                       |    2 
 arch/arm/mach-shmobile/setup-emev2.c                     |    2 
 arch/arm/mach-shmobile/setup-r7s72100.c                  |    2 
 arch/arm/mach-shmobile/setup-r8a73a4.c                   |    2 
 arch/arm/mach-shmobile/setup-r8a7740.c                   |    2 
 arch/arm/mach-shmobile/setup-r8a7778.c                   |    2 
 arch/arm/mach-shmobile/setup-r8a7779.c                   |    2 
 arch/arm/mach-shmobile/setup-r8a7790.c                   |    2 
 arch/arm/mach-shmobile/setup-r8a7791.c                   |    2 
 arch/arm/mach-shmobile/setup-rcar-gen2.c                 |    2 
 arch/arm/mach-shmobile/setup-sh7372.c                    |    2 
 arch/arm/mach-shmobile/setup-sh73a0.c                    |    2 
 arch/arm/mach-shmobile/smp-emev2.c                       |    2 
 arch/arm/mach-shmobile/smp-r8a7779.c                     |    2 
 arch/arm/mach-shmobile/smp-r8a7790.c                     |    2 
 arch/arm/mach-shmobile/smp-r8a7791.c                     |    2 
 arch/arm/mach-shmobile/smp-sh73a0.c                      |    2 
 53 files changed, 107 insertions(+), 107 deletions(-)
arch/arm/mach-shmobile/board-ape6evm-reference.c +1 -1
@@ -24,10 +24,10 @@
 #include <linux/pinctrl/machine.h>
 #include <linux/platform_device.h>
 #include <linux/sh_clk.h>
-#include <mach/common.h>
 #include <mach/r8a73a4.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 
 static void __init ape6evm_add_standard_devices(void)
 {
arch/arm/mach-shmobile/board-ape6evm.c +1 -1
@@ -33,10 +33,10 @@
 #include <linux/regulator/machine.h>
 #include <linux/sh_clk.h>
 #include <linux/smsc911x.h>
-#include <mach/common.h>
 #include <mach/r8a73a4.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 #include "irqs.h"
 
 /* LEDS */
arch/arm/mach-shmobile/board-armadillo800eva-reference.c +1 -1
@@ -24,10 +24,10 @@
 #include <linux/kernel.h>
 #include <linux/gpio.h>
 #include <linux/io.h>
-#include <mach/common.h>
 #include <mach/r8a7740.h>
 #include <asm/mach/arch.h>
 #include <asm/hardware/cache-l2x0.h>
+#include "common.h"
 
 /*
  * CON1		Camera Module
arch/arm/mach-shmobile/board-armadillo800eva.c +1 -1
@@ -45,7 +45,6 @@
 #include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/i2c-gpio.h>
 #include <linux/reboot.h>
-#include <mach/common.h>
 #include <mach/r8a7740.h>
 #include <media/mt9t112.h>
 #include <media/sh_mobile_ceu.h>
@@ -60,6 +59,7 @@
 #include <video/sh_mobile_hdmi.h>
 #include <sound/sh_fsi.h>
 #include <sound/simple_card.h>
+#include "common.h"
 #include "irqs.h"
 #include "sh-gpio.h"
 
arch/arm/mach-shmobile/board-bockw-reference.c +1 -1
@@ -19,9 +19,9 @@
  */
 
 #include <linux/of_platform.h>
-#include <mach/common.h>
 #include <mach/r8a7778.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 
 /*
  *	see board-bock.c for checking detail of dip-switch
arch/arm/mach-shmobile/board-bockw.c +1 -1
@@ -35,11 +35,11 @@
 #include <linux/spi/flash.h>
 #include <linux/usb/renesas_usbhs.h>
 #include <media/soc_camera.h>
-#include <mach/common.h>
 #include <mach/r8a7778.h>
 #include <asm/mach/arch.h>
 #include <sound/rcar_snd.h>
 #include <sound/simple_card.h>
+#include "common.h"
 #include "irqs.h"
 
 #define FPGA	0x18200000
arch/arm/mach-shmobile/board-genmai-reference.c +1 -1
@@ -20,11 +20,11 @@
 
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
-#include <mach/common.h>
 #include <mach/r7s72100.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
+#include "common.h"
 
 /*
  * This is a really crude hack to provide clkdev support to platform
arch/arm/mach-shmobile/board-genmai.c +1 -1
@@ -25,10 +25,10 @@
 #include <linux/sh_eth.h>
 #include <linux/spi/rspi.h>
 #include <linux/spi/spi.h>
-#include <mach/common.h>
 #include <mach/r7s72100.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 #include "irqs.h"
 
 /* Ether */
arch/arm/mach-shmobile/board-koelsch-reference.c +1 -1
@@ -23,11 +23,11 @@
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
 #include <linux/platform_data/rcar-du.h>
-#include <mach/common.h>
 #include <mach/rcar-gen2.h>
 #include <mach/r8a7791.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
+#include "common.h"
 #include "irqs.h"
 
 /* DU */
arch/arm/mach-shmobile/board-koelsch.c +1 -1
@@ -45,11 +45,11 @@
 #include <linux/spi/flash.h>
 #include <linux/spi/rspi.h>
 #include <linux/spi/spi.h>
-#include <mach/common.h>
 #include <mach/r8a7791.h>
 #include <mach/rcar-gen2.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 #include "irqs.h"
 
 /* DU */
arch/arm/mach-shmobile/board-kzm9g-reference.c +1 -1
@@ -26,10 +26,10 @@
 #include <linux/input.h>
 #include <linux/of_platform.h>
 #include <mach/sh73a0.h>
-#include <mach/common.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 
 static void __init kzm_init(void)
 {
arch/arm/mach-shmobile/board-kzm9g.c +1 -1
@@ -44,11 +44,11 @@
 #include <sound/sh_fsi.h>
 #include <sound/simple_card.h>
 #include <mach/sh73a0.h>
-#include <mach/common.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <video/sh_mobile_lcdc.h>
+#include "common.h"
 #include "irqs.h"
 
 /*
arch/arm/mach-shmobile/board-lager-reference.c +1 -1
@@ -22,11 +22,11 @@
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <linux/platform_data/rcar-du.h>
-#include <mach/common.h>
 #include <mach/rcar-gen2.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
+#include "common.h"
 #include "irqs.h"
 
 /* DU */
arch/arm/mach-shmobile/board-lager.c +1 -1
@@ -45,7 +45,6 @@
 #include <linux/sh_eth.h>
 #include <linux/usb/phy.h>
 #include <linux/usb/renesas_usbhs.h>
-#include <mach/common.h>
 #include <mach/r8a7790.h>
 #include <media/soc_camera.h>
 #include <asm/mach-types.h>
@@ -57,6 +56,7 @@
 #include <linux/spi/spi.h>
 #include <sound/rcar_snd.h>
 #include <sound/simple_card.h>
+#include "common.h"
 #include "irqs.h"
 
 /*
arch/arm/mach-shmobile/board-mackerel.c +1 -1
@@ -57,10 +57,10 @@
 #include <media/soc_camera_platform.h>
 #include <sound/sh_fsi.h>
 #include <sound/simple_card.h>
-#include <mach/common.h>
 #include <mach/sh7372.h>
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
+#include "common.h"
 #include "irqs.h"
 #include "sh-gpio.h"
 
arch/arm/mach-shmobile/board-marzen-reference.c +1 -1
@@ -23,10 +23,10 @@
 #include <linux/clocksource.h>
 #include <linux/of_platform.h>
 #include <mach/r8a7779.h>
-#include <mach/common.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
+#include "common.h"
 #include "irqs.h"
 
 static void __init marzen_init_timer(void)
arch/arm/mach-shmobile/board-marzen.c +1 -1
@@ -43,10 +43,10 @@
 #include <linux/mfd/tmio.h>
 #include <media/soc_camera.h>
 #include <mach/r8a7779.h>
-#include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/traps.h>
+#include "common.h"
 #include "irqs.h"
 
 /* Fixed 3.3V regulator to be used by SDHI0 */
arch/arm/mach-shmobile/clock-r7s72100.c +1 -1
@@ -19,8 +19,8 @@
 #include <linux/io.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/common.h>
 #include <mach/r7s72100.h>
+#include "common.h"
 
 /* Frequency Control Registers */
 #define FRQCR		0xfcfe0010
arch/arm/mach-shmobile/clock-r8a73a4.c +1 -1
@@ -22,7 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/common.h>
+#include "common.h"
 #include "clock.h"
 
 #define CPG_BASE 0xe6150000
arch/arm/mach-shmobile/clock-r8a7740.c +1 -1
@@ -22,9 +22,9 @@
 #include <linux/io.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/common.h>
 #include <mach/r8a7740.h>
 #include "clock.h"
+#include "common.h"
 
 /*
  *        |  MDx  |  XTAL1/EXTAL1   |  System   | EXTALR |
arch/arm/mach-shmobile/clock-r8a7778.c +1 -1
@@ -39,8 +39,8 @@
 #include <linux/io.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/common.h>
 #include "clock.h"
+#include "common.h"
 
 #define MSTPCR0		IOMEM(0xffc80030)
 #define MSTPCR1		IOMEM(0xffc80034)
arch/arm/mach-shmobile/clock-r8a7779.c +1 -1
@@ -24,9 +24,9 @@
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
 #include <linux/sh_timer.h>
-#include <mach/common.h>
 #include <mach/r8a7779.h>
 #include "clock.h"
+#include "common.h"
 
 /*
  *		MD1 = 1			MD1 = 0
arch/arm/mach-shmobile/clock-r8a7790.c +1 -1
@@ -22,9 +22,9 @@
 #include <linux/kernel.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/common.h>
 #include <mach/r8a7790.h>
 #include "clock.h"
+#include "common.h"
 
 /*
  *   MD		EXTAL		PLL0	PLL1	PLL3
arch/arm/mach-shmobile/clock-r8a7791.c +1 -1
@@ -23,9 +23,9 @@
 #include <linux/kernel.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/common.h>
 #include <mach/rcar-gen2.h>
 #include "clock.h"
+#include "common.h"
 
 /*
  *   MD		EXTAL		PLL0	PLL1	PLL3
arch/arm/mach-shmobile/clock-sh7372.c +1 -1
@@ -21,8 +21,8 @@
 #include <linux/io.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/common.h>
 #include "clock.h"
+#include "common.h"
 
 /* SH7372 registers */
 #define FRQCRA		IOMEM(0xe6150000)
arch/arm/mach-shmobile/clock-sh73a0.c +1 -1
@@ -22,8 +22,8 @@
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
 #include <asm/processor.h>
-#include <mach/common.h>
 #include "clock.h"
+#include "common.h"
 
 #define FRQCRA		IOMEM(0xe6150000)
 #define FRQCRB		IOMEM(0xe6150004)
arch/arm/mach-shmobile/clock.c +1 -1
@@ -49,8 +49,8 @@ void __init shmobile_clk_workaround(cons
 #else /* CONFIG_COMMON_CLK */
 #include <linux/sh_clk.h>
 #include <linux/export.h>
-#include <mach/common.h>
 #include "clock.h"
+#include "common.h"
 
 unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk)
 {
arch/arm/mach-shmobile/common.h new file +56 -0

56 lines not on this page · raw message

arch/arm/mach-shmobile/console.c +1 -1
@@ -19,8 +19,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <mach/common.h>
 #include <asm/mach/map.h>
+#include "common.h"
 
 void __init shmobile_setup_console(void)
 {
arch/arm/mach-shmobile/include/mach/common.h deleted +0 -56

56 lines not on this page · raw message

arch/arm/mach-shmobile/platsmp-apmu.c +1 -1
@@ -16,7 +16,7 @@
 #include <asm/cacheflush.h>
 #include <asm/cp15.h>
 #include <asm/smp_plat.h>
-#include <mach/common.h>
+#include "common.h"
 
 static struct {
 	void __iomem *iomem;
arch/arm/mach-shmobile/platsmp-scu.c +1 -1
@@ -15,7 +15,7 @@
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
-#include <mach/common.h>
+#include "common.h"
 
 static int shmobile_smp_scu_notifier_call(struct notifier_block *nfb,
 					  unsigned long action, void *hcpu)
arch/arm/mach-shmobile/platsmp.c +1 -1
@@ -13,7 +13,7 @@
 #include <linux/init.h>
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
-#include <mach/common.h>
+#include "common.h"
 
 extern unsigned long shmobile_smp_fn[];
 extern unsigned long shmobile_smp_arg[];
arch/arm/mach-shmobile/pm-r8a7740.c +1 -1
@@ -11,7 +11,7 @@
 #include <linux/console.h>
 #include <linux/suspend.h>
 #include <mach/pm-rmobile.h>
-#include <mach/common.h>
+#include "common.h"
 
 #ifdef CONFIG_PM
 static int r8a7740_pd_a4s_suspend(void)
arch/arm/mach-shmobile/pm-r8a7779.c +1 -1
@@ -19,9 +19,9 @@
 #include <linux/interrupt.h>
 #include <linux/console.h>
 #include <asm/io.h>
-#include <mach/common.h>
 #include <mach/pm-rcar.h>
 #include <mach/r8a7779.h>
+#include "common.h"
 
 /* SYSC */
 #define SYSCIER 0x0c
arch/arm/mach-shmobile/pm-sh7372.c +1 -1
@@ -25,9 +25,9 @@
 #include <asm/io.h>
 #include <asm/tlbflush.h>
 #include <asm/suspend.h>
-#include <mach/common.h>
 #include <mach/sh7372.h>
 #include <mach/pm-rmobile.h>
+#include "common.h"
 
 /* DBG */
 #define DBGREG1 IOMEM(0xe6100020)
arch/arm/mach-shmobile/pm-sh73a0.c +1 -1
@@ -9,7 +9,7 @@
  */
 
 #include <linux/suspend.h>
-#include <mach/common.h>
+#include "common.h"
 
 #ifdef CONFIG_SUSPEND
 static int sh73a0_enter_suspend(suspend_state_t suspend_state)
arch/arm/mach-shmobile/setup-emev2.c +1 -1
@@ -20,10 +20,10 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/of_platform.h>
-#include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
+#include "common.h"
 
 static struct map_desc emev2_io_desc[] __initdata = {
 #ifdef CONFIG_SMP
arch/arm/mach-shmobile/setup-r7s72100.c +1 -1
@@ -22,9 +22,9 @@
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
 #include <linux/sh_timer.h>
-#include <mach/common.h>
 #include <mach/r7s72100.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 #include "irqs.h"
 
 static struct resource mtu2_resources[] __initdata = {
arch/arm/mach-shmobile/setup-r8a73a4.c +1 -1
@@ -24,9 +24,9 @@
 #include <linux/serial_sci.h>
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
-#include <mach/common.h>
 #include <mach/r8a73a4.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 #include "dma-register.h"
 #include "irqs.h"
 
arch/arm/mach-shmobile/setup-r8a7740.c +1 -1
@@ -33,11 +33,11 @@
 #include <linux/platform_data/sh_ipmmu.h>
 #include <mach/r8a7740.h>
 #include <mach/pm-rmobile.h>
-#include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include "common.h"
 #include "dma-register.h"
 #include "irqs.h"
 
arch/arm/mach-shmobile/setup-r8a7778.c +1 -1
@@ -38,9 +38,9 @@
 #include <linux/usb/ohci_pdriver.h>
 #include <linux/dma-mapping.h>
 #include <mach/r8a7778.h>
-#include <mach/common.h>
 #include <asm/mach/arch.h>
 #include <asm/hardware/cache-l2x0.h>
+#include "common.h"
 #include "irqs.h"
 
 /* SCIF */
arch/arm/mach-shmobile/setup-r8a7779.c +1 -1
@@ -41,12 +41,12 @@
 #include <linux/usb/ohci_pdriver.h>
 #include <linux/pm_runtime.h>
 #include <mach/r8a7779.h>
-#include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
 #include <asm/hardware/cache-l2x0.h>
+#include "common.h"
 #include "irqs.h"
 
 static struct map_desc r8a7779_io_desc[] __initdata = {
arch/arm/mach-shmobile/setup-r8a7790.c +1 -1
@@ -26,9 +26,9 @@
 #include <linux/serial_sci.h>
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
-#include <mach/common.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 #include "dma-register.h"
 #include "irqs.h"
 
arch/arm/mach-shmobile/setup-r8a7791.c +1 -1
@@ -26,10 +26,10 @@
 #include <linux/platform_data/irq-renesas-irqc.h>
 #include <linux/serial_sci.h>
 #include <linux/sh_timer.h>
-#include <mach/common.h>
 #include <mach/r8a7791.h>
 #include <mach/rcar-gen2.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 #include "irqs.h"
 
 static const struct resource pfc_resources[] __initconst = {
arch/arm/mach-shmobile/setup-rcar-gen2.c +1 -1
@@ -22,9 +22,9 @@
 #include <linux/clocksource.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
-#include <mach/common.h>
 #include <mach/rcar-gen2.h>
 #include <asm/mach/arch.h>
+#include "common.h"
 
 #define MODEMR 0xe6160060
 
arch/arm/mach-shmobile/setup-sh7372.c +1 -1
@@ -34,11 +34,11 @@
 #include <linux/dma-mapping.h>
 #include <linux/platform_data/sh_ipmmu.h>
 #include <mach/sh7372.h>
-#include <mach/common.h>
 #include <asm/mach/map.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include "common.h"
 #include "dma-register.h"
 #include "irqs.h"
 
arch/arm/mach-shmobile/setup-sh73a0.c +1 -1
@@ -33,11 +33,11 @@
 #include <linux/platform_data/sh_ipmmu.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
 #include <mach/sh73a0.h>
-#include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include "common.h"
 #include "dma-register.h"
 #include "irqs.h"
 
arch/arm/mach-shmobile/smp-emev2.c +1 -1
@@ -23,9 +23,9 @@
 #include <linux/spinlock.h>
 #include <linux/io.h>
 #include <linux/delay.h>
-#include <mach/common.h>
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
+#include "common.h"
 
 #define EMEV2_SCU_BASE 0x1e000000
 #define EMEV2_SMU_BASE 0xe0110000
arch/arm/mach-shmobile/smp-r8a7779.c +1 -1
@@ -23,13 +23,13 @@
 #include <linux/spinlock.h>
 #include <linux/io.h>
 #include <linux/delay.h>
-#include <mach/common.h>
 #include <mach/pm-rcar.h>
 #include <mach/r8a7779.h>
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 #include <asm/smp_twd.h>
+#include "common.h"
 
 #define AVECR IOMEM(0xfe700040)
 #define R8A7779_SCU_BASE 0xf0000000
arch/arm/mach-shmobile/smp-r8a7790.c +1 -1
@@ -18,9 +18,9 @@
 #include <linux/smp.h>
 #include <linux/io.h>
 #include <asm/smp_plat.h>
-#include <mach/common.h>
 #include <mach/pm-rcar.h>
 #include <mach/r8a7790.h>
+#include "common.h"
 
 #define RST		0xe6160000
 #define CA15BAR		0x0020
arch/arm/mach-shmobile/smp-r8a7791.c +1 -1
@@ -18,9 +18,9 @@
 #include <linux/smp.h>
 #include <linux/io.h>
 #include <asm/smp_plat.h>
-#include <mach/common.h>
 #include <mach/r8a7791.h>
 #include <mach/rcar-gen2.h>
+#include "common.h"
 
 #define RST		0xe6160000
 #define CA15BAR		0x0020
arch/arm/mach-shmobile/smp-sh73a0.c +1 -1
@@ -22,10 +22,10 @@
 #include <linux/smp.h>
 #include <linux/io.h>
 #include <linux/delay.h>
-#include <mach/common.h>
 #include <mach/sh73a0.h>
 #include <asm/smp_plat.h>
 #include <asm/smp_twd.h>
+#include "common.h"
 
 #define WUPCR		IOMEM(0xe6151010)
 #define SRESCR		IOMEM(0xe6151018)
author maintainer
#6 lore raw

PATCH 6/8 ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Move most of pm-rmobile.h so it can be used as #include "pm-rmobile.h" instead of the old style #include <mach/pm-rmobile.h>. Also clean up the sh7372 and sh73a0 header files to get rid of unused include files.

---

 arch/arm/mach-shmobile/board-armadillo800eva.c   |    1 
 arch/arm/mach-shmobile/board-mackerel.c          |    2 
 arch/arm/mach-shmobile/include/mach/pm-rmobile.h |   63 ----------------------
 arch/arm/mach-shmobile/include/mach/r8a7740.h    |    2 
 arch/arm/mach-shmobile/include/mach/sh7372.h     |    4 -
 arch/arm/mach-shmobile/pm-r8a7740.c              |    2 
 arch/arm/mach-shmobile/pm-rmobile.c              |    2 
 arch/arm/mach-shmobile/pm-rmobile.h              |   63 ++++++++++++++++++++++
 arch/arm/mach-shmobile/pm-sh7372.c               |    2 
 arch/arm/mach-shmobile/setup-r8a7740.c           |    2 
 arch/arm/mach-shmobile/setup-sh7372.c            |    1 
 11 files changed, 71 insertions(+), 73 deletions(-)
arch/arm/mach-shmobile/board-armadillo800eva.c +1 -0
@@ -61,6 +61,7 @@
 #include <sound/simple_card.h>
 #include "common.h"
 #include "irqs.h"
+#include "pm-rmobile.h"
 #include "sh-gpio.h"
 
 /*
arch/arm/mach-shmobile/board-mackerel.c +2 -0
@@ -47,6 +47,7 @@
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/smsc911x.h>
+#include <linux/sh_clk.h>
 #include <linux/tca6416_keypad.h>
 #include <linux/usb/renesas_usbhs.h>
 #include <linux/dma-mapping.h>
@@ -62,6 +63,7 @@
 #include <asm/mach-types.h>
 #include "common.h"
 #include "irqs.h"
+#include "pm-rmobile.h"
 #include "sh-gpio.h"
 
 /*
arch/arm/mach-shmobile/include/mach/pm-rmobile.h deleted +0 -63

63 lines not on this page · raw message

arch/arm/mach-shmobile/include/mach/r8a7740.h +0 -2
@@ -19,8 +19,6 @@
 #ifndef __ASM_R8A7740_H__
 #define __ASM_R8A7740_H__
 
-#include <mach/pm-rmobile.h>
-
 /*
  * MD_CKx pin
  */
arch/arm/mach-shmobile/include/mach/sh7372.h +0 -4
@@ -11,10 +11,6 @@
 #ifndef __ASM_SH7372_H__
 #define __ASM_SH7372_H__
 
-#include <linux/sh_clk.h>
-#include <linux/pm_domain.h>
-#include <mach/pm-rmobile.h>
-
 /* DMA slave IDs */
 enum {
 	SHDMA_SLAVE_INVALID,
arch/arm/mach-shmobile/pm-r8a7740.c +1 -1
@@ -10,8 +10,8 @@
  */
 #include <linux/console.h>
 #include <linux/suspend.h>
-#include <mach/pm-rmobile.h>
 #include "common.h"
+#include "pm-rmobile.h"
 
 #ifdef CONFIG_PM
 static int r8a7740_pd_a4s_suspend(void)
arch/arm/mach-shmobile/pm-rmobile.c +1 -1
@@ -17,7 +17,7 @@
 #include <linux/pm.h>
 #include <linux/pm_clock.h>
 #include <asm/io.h>
-#include <mach/pm-rmobile.h>
+#include "pm-rmobile.h"
 
 /* SYSC */
 #define SPDCR		IOMEM(0xe6180008)
arch/arm/mach-shmobile/pm-rmobile.h new file +63 -0

63 lines not on this page · raw message

arch/arm/mach-shmobile/pm-sh7372.c +1 -1
@@ -26,8 +26,8 @@
 #include <asm/tlbflush.h>
 #include <asm/suspend.h>
 #include <mach/sh7372.h>
-#include <mach/pm-rmobile.h>
 #include "common.h"
+#include "pm-rmobile.h"
 
 /* DBG */
 #define DBGREG1 IOMEM(0xe6100020)
arch/arm/mach-shmobile/setup-r8a7740.c +1 -1
@@ -32,7 +32,6 @@
 #include <linux/sh_timer.h>
 #include <linux/platform_data/sh_ipmmu.h>
 #include <mach/r8a7740.h>
-#include <mach/pm-rmobile.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
@@ -40,6 +39,7 @@
 #include "common.h"
 #include "dma-register.h"
 #include "irqs.h"
+#include "pm-rmobile.h"
 
 static struct map_desc r8a7740_io_desc[] __initdata = {
 	 /*
arch/arm/mach-shmobile/setup-sh7372.c +1 -0
@@ -41,6 +41,7 @@
 #include "common.h"
 #include "dma-register.h"
 #include "irqs.h"
+#include "pm-rmobile.h"
 
 static struct map_desc sh7372_io_desc[] __initdata = {
 	/* create a 1:1 entity map for 0xe6xxxxxx
author maintainer
#7 lore raw

PATCH 7/8 ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Move most of pm-rcar.h so it can be used as #include "pm-rcar.h" instead of the old style #include <mach/pm-rcar.h>. Also clean up the r8a7779 case to move some unused header file cruft into a C file.

---

 arch/arm/mach-shmobile/include/mach/pm-rcar.h |   15 ---------------
 arch/arm/mach-shmobile/include/mach/r8a7779.h |   13 -------------
 arch/arm/mach-shmobile/pm-r8a7779.c           |   13 ++++++++++++-
 arch/arm/mach-shmobile/pm-r8a7790.c           |    2 +-
 arch/arm/mach-shmobile/pm-rcar.c              |    2 +-
 arch/arm/mach-shmobile/pm-rcar.h              |   15 +++++++++++++++
 arch/arm/mach-shmobile/smp-r8a7779.c          |    2 +-
 arch/arm/mach-shmobile/smp-r8a7790.c          |    2 +-
 8 files changed, 31 insertions(+), 33 deletions(-)
arch/arm/mach-shmobile/include/mach/pm-rcar.h deleted +0 -15
@@ -1,15 +0,0 @@
-#ifndef PM_RCAR_H
-#define PM_RCAR_H
-
-struct rcar_sysc_ch {
-	unsigned long chan_offs;
-	unsigned int chan_bit;
-	unsigned int isr_bit;
-};
-
-int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch);
-int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch);
-bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch);
-void __iomem *rcar_sysc_init(phys_addr_t base);
-
-#endif /* PM_RCAR_H */
arch/arm/mach-shmobile/include/mach/r8a7779.h +0 -13
@@ -1,9 +1,6 @@
 #ifndef __ASM_R8A7779_H__
 #define __ASM_R8A7779_H__
 
-#include <linux/pm_domain.h>
-#include <mach/pm-rcar.h>
-
 /* HPB-DMA slave IDs */
 enum {
 	HPBDMA_SLAVE_DUMMY,
@@ -11,16 +8,6 @@ enum {
 	HPBDMA_SLAVE_SDHI0_RX,
 };
 
-struct r8a7779_pm_domain {
-	struct generic_pm_domain genpd;
-	struct rcar_sysc_ch ch;
-};
-
-static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
-{
-	return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
-}
-
 extern void r8a7779_init_delay(void);
 extern void r8a7779_init_irq_extpin(int irlm);
 extern void r8a7779_init_irq_extpin_dt(int irlm);
arch/arm/mach-shmobile/pm-r8a7779.c +12 -1
@@ -13,20 +13,31 @@
 #include <linux/suspend.h>
 #include <linux/err.h>
 #include <linux/pm_clock.h>
+#include <linux/pm_domain.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/console.h>
 #include <asm/io.h>
-#include <mach/pm-rcar.h>
 #include <mach/r8a7779.h>
 #include "common.h"
+#include "pm-rcar.h"
 
 /* SYSC */
 #define SYSCIER 0x0c
 #define SYSCIMR 0x10
 
+struct r8a7779_pm_domain {
+	struct generic_pm_domain genpd;
+	struct rcar_sysc_ch ch;
+};
+
+static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
+{
+	return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
+}
+
 #if defined(CONFIG_PM) || defined(CONFIG_SMP)
 
 static void __init r8a7779_sysc_init(void)
arch/arm/mach-shmobile/pm-r8a7790.c +1 -1
@@ -12,8 +12,8 @@
 
 #include <linux/kernel.h>
 #include <asm/io.h>
-#include <mach/pm-rcar.h>
 #include <mach/r8a7790.h>
+#include "pm-rcar.h"
 
 /* SYSC */
 #define SYSCIER 0x0c
arch/arm/mach-shmobile/pm-rcar.c +1 -1
@@ -13,7 +13,7 @@
 #include <linux/mm.h>
 #include <linux/spinlock.h>
 #include <asm/io.h>
-#include <mach/pm-rcar.h>
+#include "pm-rcar.h"
 
 /* SYSC */
 #define SYSCSR 0x00
arch/arm/mach-shmobile/pm-rcar.h new file +15 -0
@@ -0,0 +1,15 @@
+#ifndef PM_RCAR_H
+#define PM_RCAR_H
+
+struct rcar_sysc_ch {
+	unsigned long chan_offs;
+	unsigned int chan_bit;
+	unsigned int isr_bit;
+};
+
+int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch);
+int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch);
+bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch);
+void __iomem *rcar_sysc_init(phys_addr_t base);
+
+#endif /* PM_RCAR_H */
arch/arm/mach-shmobile/smp-r8a7779.c +1 -1
@@ -23,13 +23,13 @@
 #include <linux/spinlock.h>
 #include <linux/io.h>
 #include <linux/delay.h>
-#include <mach/pm-rcar.h>
 #include <mach/r8a7779.h>
 #include <asm/cacheflush.h>
 #include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 #include <asm/smp_twd.h>
 #include "common.h"
+#include "pm-rcar.h"
 
 #define AVECR IOMEM(0xfe700040)
 #define R8A7779_SCU_BASE 0xf0000000
arch/arm/mach-shmobile/smp-r8a7790.c +1 -1
@@ -18,9 +18,9 @@
 #include <linux/smp.h>
 #include <linux/io.h>
 #include <asm/smp_plat.h>
-#include <mach/pm-rcar.h>
 #include <mach/r8a7790.h>
 #include "common.h"
+#include "pm-rcar.h"
 
 #define RST		0xe6160000
 #define CA15BAR		0x0020
author maintainer
#8 lore raw

PATCH 8/8 ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Move most of rcar-gen2.h so it can be used as #include "rcar-gen2.h" instead of the old style #include <mach/rcar-gen2.h>. Also clean up the r8a7790 case to follow the same style as r8a7791.

---

 arch/arm/mach-shmobile/board-koelsch-reference.c |    2 +-
 arch/arm/mach-shmobile/board-koelsch.c           |    2 +-
 arch/arm/mach-shmobile/board-lager-reference.c   |    2 +-
 arch/arm/mach-shmobile/board-lager.c             |    1 +
 arch/arm/mach-shmobile/clock-r8a7790.c           |    1 +
 arch/arm/mach-shmobile/clock-r8a7791.c           |    2 +-
 arch/arm/mach-shmobile/include/mach/r8a7790.h    |    2 --
 arch/arm/mach-shmobile/include/mach/rcar-gen2.h  |    8 --------
 arch/arm/mach-shmobile/rcar-gen2.h               |    8 ++++++++
 arch/arm/mach-shmobile/setup-r8a7790.c           |    1 +
 arch/arm/mach-shmobile/setup-r8a7791.c           |    2 +-
 arch/arm/mach-shmobile/setup-rcar-gen2.c         |    2 +-
 arch/arm/mach-shmobile/smp-r8a7791.c             |    2 +-
 13 files changed, 18 insertions(+), 17 deletions(-)
arch/arm/mach-shmobile/board-koelsch-reference.c +1 -1
@@ -23,12 +23,12 @@
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
 #include <linux/platform_data/rcar-du.h>
-#include <mach/rcar-gen2.h>
 #include <mach/r8a7791.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
 #include "common.h"
 #include "irqs.h"
+#include "rcar-gen2.h"
 
 /* DU */
 static struct rcar_du_encoder_data koelsch_du_encoders[] = {
arch/arm/mach-shmobile/board-koelsch.c +1 -1
@@ -46,11 +46,11 @@
 #include <linux/spi/rspi.h>
 #include <linux/spi/spi.h>
 #include <mach/r8a7791.h>
-#include <mach/rcar-gen2.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include "common.h"
 #include "irqs.h"
+#include "rcar-gen2.h"
 
 /* DU */
 static struct rcar_du_encoder_data koelsch_du_encoders[] = {
arch/arm/mach-shmobile/board-lager-reference.c +1 -1
@@ -22,12 +22,12 @@
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <linux/platform_data/rcar-du.h>
-#include <mach/rcar-gen2.h>
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
 #include "clock.h"
 #include "common.h"
 #include "irqs.h"
+#include "rcar-gen2.h"
 
 /* DU */
 static struct rcar_du_encoder_data lager_du_encoders[] = {
arch/arm/mach-shmobile/board-lager.c +1 -0
@@ -58,6 +58,7 @@
 #include <sound/simple_card.h>
 #include "common.h"
 #include "irqs.h"
+#include "rcar-gen2.h"
 
 /*
  * SSI-AK4643
arch/arm/mach-shmobile/clock-r8a7790.c +1 -0
@@ -25,6 +25,7 @@
 #include <mach/r8a7790.h>
 #include "clock.h"
 #include "common.h"
+#include "rcar-gen2.h"
 
 /*
  *   MD		EXTAL		PLL0	PLL1	PLL3
arch/arm/mach-shmobile/clock-r8a7791.c +1 -1
@@ -23,9 +23,9 @@
 #include <linux/kernel.h>
 #include <linux/sh_clk.h>
 #include <linux/clkdev.h>
-#include <mach/rcar-gen2.h>
 #include "clock.h"
 #include "common.h"
+#include "rcar-gen2.h"
 
 /*
  *   MD		EXTAL		PLL0	PLL1	PLL3
arch/arm/mach-shmobile/include/mach/r8a7790.h +0 -2
@@ -1,8 +1,6 @@
 #ifndef __ASM_R8A7790_H__
 #define __ASM_R8A7790_H__
 
-#include <mach/rcar-gen2.h>
-
 /* DMA slave IDs */
 enum {
 	RCAR_DMA_SLAVE_INVALID,
arch/arm/mach-shmobile/include/mach/rcar-gen2.h deleted +0 -8
@@ -1,8 +0,0 @@
-#ifndef __ASM_RCAR_GEN2_H__
-#define __ASM_RCAR_GEN2_H__
-
-void rcar_gen2_timer_init(void);
-#define MD(nr) BIT(nr)
-u32 rcar_gen2_read_mode_pins(void);
-
-#endif /* __ASM_RCAR_GEN2_H__ */
arch/arm/mach-shmobile/rcar-gen2.h new file +8 -0
@@ -0,0 +1,8 @@
+#ifndef __ASM_RCAR_GEN2_H__
+#define __ASM_RCAR_GEN2_H__
+
+void rcar_gen2_timer_init(void);
+#define MD(nr) BIT(nr)
+u32 rcar_gen2_read_mode_pins(void);
+
+#endif /* __ASM_RCAR_GEN2_H__ */
arch/arm/mach-shmobile/setup-r8a7790.c +1 -0
@@ -31,6 +31,7 @@
 #include "common.h"
 #include "dma-register.h"
 #include "irqs.h"
+#include "rcar-gen2.h"
 
 /* Audio-DMAC */
 #define AUDIO_DMAC_SLAVE(_id, _addr, t, r)			\
arch/arm/mach-shmobile/setup-r8a7791.c +1 -1
@@ -27,10 +27,10 @@
 #include <linux/serial_sci.h>
 #include <linux/sh_timer.h>
 #include <mach/r8a7791.h>
-#include <mach/rcar-gen2.h>
 #include <asm/mach/arch.h>
 #include "common.h"
 #include "irqs.h"
+#include "rcar-gen2.h"
 
 static const struct resource pfc_resources[] __initconst = {
 	DEFINE_RES_MEM(0xe6060000, 0x250),
arch/arm/mach-shmobile/setup-rcar-gen2.c +1 -1
@@ -22,9 +22,9 @@
 #include <linux/clocksource.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
-#include <mach/rcar-gen2.h>
 #include <asm/mach/arch.h>
 #include "common.h"
+#include "rcar-gen2.h"
 
 #define MODEMR 0xe6160060
 
arch/arm/mach-shmobile/smp-r8a7791.c +1 -1
@@ -19,8 +19,8 @@
 #include <linux/io.h>
 #include <asm/smp_plat.h>
 #include <mach/r8a7791.h>
-#include <mach/rcar-gen2.h>
 #include "common.h"
+#include "rcar-gen2.h"
 
 #define RST		0xe6160000
 #define CA15BAR		0x0020

Magnus Damm

author maintainer
#0 lore raw

cover ARM: shmobile: Rework include path (Try 2, Part 1)

ARM: shmobile: Rework include path (Try 2, Part 1)

[PATCH 01/08] ARM: shmobile: Move intc.h, cleanup sh_intc.h usage [PATCH 02/08] ARM: shmobile: Move dma-register.h
[PATCH 03/08] ARM: shmobile: Move clock.h
[PATCH 04/08] ARM: shmobile: Move most of irqs.h, keep some for pinctl [PATCH 05/08] ARM: shmobile: Move common.h
[PATCH 06/08] ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h [PATCH 07/08] ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case [PATCH 08/08] ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case

Olof, here my latest take on the header move that you requested earlier.

This particular series hopefully follows your proposed way and moves the most common shared header files for mach-shmobile from <mach/foobar.h> to "foobar.h" without any workaround. Left are still per-SoC header files that will be moved once I know you are comformatble with this format.

Please note that these are only lightly compile tested with a handful of defconfigs, but any potential issue should be trivial to fix.

Also, there are certain bits of arch/arm/mach-shmobile/include/mach/ get included from places like arch/arm/boot/compressed/ (booting legacy kernel directly from reset vector) and also from SoC specific legacy code under drivers/pinctrl. My proposal is to keep those users as-is until we phase out legacy board support (2-3 kernels?), let me know if you would like to get rid of "include/mach" sooner!

Thanks!

---

Written against renesas.git tag renesas-devel-v3.15-rc5-20140517 and "[PATCH 00/03] ARM: shmobile: Use shmobile_init_delay() on r8a7790"

 arch/arm/mach-shmobile/board-ape6evm-reference.c         |    2 
 arch/arm/mach-shmobile/board-ape6evm.c                   |    4 
 arch/arm/mach-shmobile/board-armadillo800eva-reference.c |    2 
 arch/arm/mach-shmobile/board-armadillo800eva.c           |    6 
 arch/arm/mach-shmobile/board-bockw-reference.c           |    2 
 arch/arm/mach-shmobile/board-bockw.c                     |    4 
 arch/arm/mach-shmobile/board-genmai-reference.c          |    4 
 arch/arm/mach-shmobile/board-genmai.c                    |    4 
 arch/arm/mach-shmobile/board-koelsch-reference.c         |    8 
 arch/arm/mach-shmobile/board-koelsch.c                   |    6 
 arch/arm/mach-shmobile/board-kzm9g-reference.c           |    2 
 arch/arm/mach-shmobile/board-kzm9g.c                     |    4 
 arch/arm/mach-shmobile/board-lager-reference.c           |    8 
 arch/arm/mach-shmobile/board-lager.c                     |    5 
 arch/arm/mach-shmobile/board-mackerel.c                  |   10 
 arch/arm/mach-shmobile/board-marzen-reference.c          |    6 
 arch/arm/mach-shmobile/board-marzen.c                    |    4 
 arch/arm/mach-shmobile/clock-r7s72100.c                  |    2 
 arch/arm/mach-shmobile/clock-r8a73a4.c                   |    4 
 arch/arm/mach-shmobile/clock-r8a7740.c                   |    4 
 arch/arm/mach-shmobile/clock-r8a7778.c                   |    4 
 arch/arm/mach-shmobile/clock-r8a7779.c                   |    4 
 arch/arm/mach-shmobile/clock-r8a7790.c                   |    5 
 arch/arm/mach-shmobile/clock-r8a7791.c                   |    6 
 arch/arm/mach-shmobile/clock-sh7372.c                    |    4 
 arch/arm/mach-shmobile/clock-sh73a0.c                    |    4 
 arch/arm/mach-shmobile/clock.c                           |    6 
 arch/arm/mach-shmobile/clock.h                           |   56 ++
 arch/arm/mach-shmobile/common.h                          |   56 ++
 arch/arm/mach-shmobile/console.c                         |    2 
 arch/arm/mach-shmobile/dma-register.h                    |   84 ++++
 arch/arm/mach-shmobile/include/mach/clock.h              |   56 --
 arch/arm/mach-shmobile/include/mach/common.h             |   56 --
 arch/arm/mach-shmobile/include/mach/dma-register.h       |   84 ----
 arch/arm/mach-shmobile/include/mach/intc.h               |  290 --------------
 arch/arm/mach-shmobile/include/mach/irqs.h               |   17 
 arch/arm/mach-shmobile/include/mach/pm-rcar.h            |   15 
 arch/arm/mach-shmobile/include/mach/pm-rmobile.h         |   63 ---
 arch/arm/mach-shmobile/include/mach/r8a7740.h            |    2 
 arch/arm/mach-shmobile/include/mach/r8a7779.h            |   13 
 arch/arm/mach-shmobile/include/mach/r8a7790.h            |    2 
 arch/arm/mach-shmobile/include/mach/rcar-gen2.h          |    8 
 arch/arm/mach-shmobile/include/mach/sh7372.h             |    4 
 arch/arm/mach-shmobile/intc-sh7372.c                     |    5 
 arch/arm/mach-shmobile/intc-sh73a0.c                     |    5 
 arch/arm/mach-shmobile/intc.h                            |  290 ++++++++++++++
 arch/arm/mach-shmobile/irqs.h                            |   21 +
 arch/arm/mach-shmobile/platsmp-apmu.c                    |    2 
 arch/arm/mach-shmobile/platsmp-scu.c                     |    2 
 arch/arm/mach-shmobile/platsmp.c                         |    2 
 arch/arm/mach-shmobile/pm-r8a7740.c                      |    4 
 arch/arm/mach-shmobile/pm-r8a7779.c                      |   15 
 arch/arm/mach-shmobile/pm-r8a7790.c                      |    2 
 arch/arm/mach-shmobile/pm-rcar.c                         |    2 
 arch/arm/mach-shmobile/pm-rcar.h                         |   15 
 arch/arm/mach-shmobile/pm-rmobile.c                      |    2 
 arch/arm/mach-shmobile/pm-rmobile.h                      |   63 +++
 arch/arm/mach-shmobile/pm-sh7372.c                       |    4 
 arch/arm/mach-shmobile/pm-sh73a0.c                       |    2 
 arch/arm/mach-shmobile/rcar-gen2.h                       |    8 
 arch/arm/mach-shmobile/setup-emev2.c                     |    2 
 arch/arm/mach-shmobile/setup-r7s72100.c                  |    4 
 arch/arm/mach-shmobile/setup-r8a73a4.c                   |    6 
 arch/arm/mach-shmobile/setup-r8a7740.c                   |    8 
 arch/arm/mach-shmobile/setup-r8a7778.c                   |    4 
 arch/arm/mach-shmobile/setup-r8a7779.c                   |    4 
 arch/arm/mach-shmobile/setup-r8a7790.c                   |    7 
 arch/arm/mach-shmobile/setup-r8a7791.c                   |    6 
 arch/arm/mach-shmobile/setup-rcar-gen2.c                 |    4 
 arch/arm/mach-shmobile/setup-sh7372.c                    |    8 
 arch/arm/mach-shmobile/setup-sh73a0.c                    |    7 
 arch/arm/mach-shmobile/smp-emev2.c                       |    2 
 arch/arm/mach-shmobile/smp-r8a7779.c                     |    4 
 arch/arm/mach-shmobile/smp-r8a7790.c                     |    4 
 arch/arm/mach-shmobile/smp-r8a7791.c                     |    4 
 arch/arm/mach-shmobile/smp-sh73a0.c                      |    2 
 76 files changed, 724 insertions(+), 728 deletions(-)
author maintainer
#1 lore raw

PATCH 1/8 ARM: shmobile: Move intc.h, cleanup sh_intc.h usage

From: Magnus Damm <[email protected]>

Change location of intc.h so it can be used as #include "intc.h" instead of the old style #include <mach/intc.h>. Also clean up some code to get rid of redundant #include <linux/sh_intc.h>.

---

 arch/arm/mach-shmobile/board-mackerel.c    |    1 
 arch/arm/mach-shmobile/include/mach/intc.h |  290 ----------------------------
 arch/arm/mach-shmobile/intc-sh7372.c       |    3 
 arch/arm/mach-shmobile/intc-sh73a0.c       |    3 
 arch/arm/mach-shmobile/intc.h              |  290 ++++++++++++++++++++++++++++
 arch/arm/mach-shmobile/setup-sh7372.c      |    1 
 arch/arm/mach-shmobile/setup-sh73a0.c      |    1 
 7 files changed, 292 insertions(+), 297 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +0 -1
@@ -47,7 +47,6 @@
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/smsc911x.h>
-#include <linux/sh_intc.h>
 #include <linux/tca6416_keypad.h>
 #include <linux/usb/renesas_usbhs.h>
 #include <linux/dma-mapping.h>
arch/arm/mach-shmobile/include/mach/intc.h deleted +0 -290

290 lines not on this page · raw message

arch/arm/mach-shmobile/intc-sh7372.c +1 -2
@@ -22,11 +22,10 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/io.h>
-#include <linux/sh_intc.h>
-#include <mach/intc.h>
 #include <mach/irqs.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "intc.h"
 
 enum {
 	UNUSED_INTCA = 0,
arch/arm/mach-shmobile/intc-sh73a0.c +1 -2
@@ -22,14 +22,13 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/io.h>
-#include <linux/sh_intc.h>
 #include <linux/irqchip.h>
 #include <linux/irqchip/arm-gic.h>
-#include <mach/intc.h>
 #include <mach/irqs.h>
 #include <mach/sh73a0.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include "intc.h"
 
 enum {
 	UNUSED = 0,
arch/arm/mach-shmobile/intc.h new file +290 -0

290 lines not on this page · raw message

arch/arm/mach-shmobile/setup-sh7372.c +0 -1
@@ -29,7 +29,6 @@
 #include <linux/io.h>
 #include <linux/serial_sci.h>
 #include <linux/sh_dma.h>
-#include <linux/sh_intc.h>
 #include <linux/sh_timer.h>
 #include <linux/pm_domain.h>
 #include <linux/dma-mapping.h>
arch/arm/mach-shmobile/setup-sh73a0.c +0 -1
@@ -29,7 +29,6 @@
 #include <linux/io.h>
 #include <linux/serial_sci.h>
 #include <linux/sh_dma.h>
-#include <linux/sh_intc.h>
 #include <linux/sh_timer.h>
 #include <linux/platform_data/sh_ipmmu.h>
 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
#9 lore raw

cover ARM: shmobile: Rework include path (Try 2, Part 1)

In reply to Magnus Damm

Hi Magnus,

Quoted 11 lines · Magnus Damm

ARM: shmobile: Rework include path (Try 2, Part 1)

[PATCH 01/08] ARM: shmobile: Move intc.h, cleanup sh_intc.h usage [PATCH 02/08] ARM: shmobile: Move dma-register.h
[PATCH 03/08] ARM: shmobile: Move clock.h
[PATCH 04/08] ARM: shmobile: Move most of irqs.h, keep some for pinctl [PATCH 05/08] ARM: shmobile: Move common.h
[PATCH 06/08] ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h [PATCH 07/08] ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case [PATCH 08/08] ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case

Quoted 6 lines

Olof, here my latest take on the header move that you requested earlier.

This particular series hopefully follows your proposed way and moves the most common shared header files for mach-shmobile from <mach/foobar.h> to "foobar.h" without any workaround. Left are still per-SoC header files that will be moved once I know you are comformatble with this format.

Olof didn't scream, so I guess he's comfortable with it? :-) Olof?

If the propagation part is an issue, what about Simon applying it to a separate branch, to be merged into both soc-for-v3.17 and boards-for-v3.17?

Quoted 2 lines

Please note that these are only lightly compile tested with a handful of defconfigs, but any potential issue should be trivial to fix.

Indeed. And it touches arch/arm/mach-shmobile only.

Quoted 6 lines

Also, there are certain bits of arch/arm/mach-shmobile/include/mach/ get included from places like arch/arm/boot/compressed/ (booting legacy kernel directly from reset vector) and also from SoC specific legacy code under drivers/pinctrl. My proposal is to keep those users as-is until we phase out legacy board support (2-3 kernels?), let me know if you would like to get rid of "include/mach" sooner!

It seems you forgot r7s72100.h, r8a73a4.h, and sh73a0.h? Can just be moved, with #include update.

Remaining are lots of files only used by arch/arm/boot, so I'd move those (mmc*, sdhi*, zboot*) into .../boot.

mach/system.h seems to be unused?

The parts of irqs.h needed for legacy pinctrl can be extracted into drivers/pinctrl/sh-pfc/irqs_legacy.h, to be removed later. After that irqs.h can move, too.

After that, we can see what's left...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#10 lore raw

cover ARM: shmobile: Rework include path (Try 2, Part 1)

Quoted 16 lines · Geert Uytterhoeven

Hi Magnus,

Quoted 13 lines · Magnus Damm

ARM: shmobile: Rework include path (Try 2, Part 1)

[PATCH 01/08] ARM: shmobile: Move intc.h, cleanup sh_intc.h usage [PATCH 02/08] ARM: shmobile: Move dma-register.h
[PATCH 03/08] ARM: shmobile: Move clock.h
[PATCH 04/08] ARM: shmobile: Move most of irqs.h, keep some for pinctl [PATCH 05/08] ARM: shmobile: Move common.h
[PATCH 06/08] ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h [PATCH 07/08] ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case [PATCH 08/08] ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case

Olof, here my latest take on the header move that you requested earlier.

Quoted 7 lines
Quoted 4 lines

This particular series hopefully follows your proposed way and moves the most common shared header files for mach-shmobile from <mach/foobar.h> to "foobar.h" without any workaround. Left are still per-SoC header files that will be moved once I know you are comformatble with this format.

Olof didn't scream, so I guess he's comfortable with it? :-) Olof?

I'd value a nod or otherwise from Olof before merging this.

Quoted 2 lines

If the propagation part is an issue, what about Simon applying it to a separate branch, to be merged into both soc-for-v3.17 and boards-for-v3.17?

Yes, I think this will need to go into a cleanup branch which soc-for-v3.17 and boards-for-v3.17? are rebased on top of.

I believe this is a project for which I will need strong coffee as an assistant.

Quoted 43 lines
Quoted 2 lines

Please note that these are only lightly compile tested with a handful of defconfigs, but any potential issue should be trivial to fix.

Indeed. And it touches arch/arm/mach-shmobile only.

Quoted 6 lines

Also, there are certain bits of arch/arm/mach-shmobile/include/mach/ get included from places like arch/arm/boot/compressed/ (booting legacy kernel directly from reset vector) and also from SoC specific legacy code under drivers/pinctrl. My proposal is to keep those users as-is until we phase out legacy board support (2-3 kernels?), let me know if you would like to get rid of "include/mach" sooner!

It seems you forgot r7s72100.h, r8a73a4.h, and sh73a0.h? Can just be moved, with #include update.

Remaining are lots of files only used by arch/arm/boot, so I'd move those (mmc*, sdhi*, zboot*) into .../boot.

mach/system.h seems to be unused?

The parts of irqs.h needed for legacy pinctrl can be extracted into drivers/pinctrl/sh-pfc/irqs_legacy.h, to be removed later. After that irqs.h can move, too.

After that, we can see what's left...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw

cover ARM: shmobile: Rework include path (Try 2, Part 1)

In reply to Geert Uytterhoeven
Quoted 20 lines · On Friday 06 June 2014 11:11:46 Geert Uytterhoeven wrote:
Quoted 11 lines · Magnus Damm

ARM: shmobile: Rework include path (Try 2, Part 1)

[PATCH 01/08] ARM: shmobile: Move intc.h, cleanup sh_intc.h usage [PATCH 02/08] ARM: shmobile: Move dma-register.h
[PATCH 03/08] ARM: shmobile: Move clock.h
[PATCH 04/08] ARM: shmobile: Move most of irqs.h, keep some for pinctl [PATCH 05/08] ARM: shmobile: Move common.h
[PATCH 06/08] ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h [PATCH 07/08] ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case [PATCH 08/08] ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case

Quoted 6 lines

Olof, here my latest take on the header move that you requested earlier.

This particular series hopefully follows your proposed way and moves the most common shared header files for mach-shmobile from <mach/foobar.h> to "foobar.h" without any workaround. Left are still per-SoC header files that will be moved once I know you are comformatble with this format.

Quoted 5 lines

Olof didn't scream, so I guess he's comfortable with it? Olof?

If the propagation part is an issue, what about Simon applying it to a separate branch, to be merged into both soc-for-v3.17 and boards-for-v3.17?

I certainly love it.

Quoted 6 lines
Quoted 2 lines

Please note that these are only lightly compile tested with a handful of defconfigs, but any potential issue should be trivial to fix.

Indeed. And it touches arch/arm/mach-shmobile only.