ARM: shmobile: Rework include path V2
Magnus Damm
maintainerv2 cover ARM: shmobile: Rework include path V2
ARM: shmobile: Rework include path V2
[PATCH v2 01/08] ARM: shmobile: Move intc.h, cleanup sh_intc.h usage [PATCH v2 02/08] ARM: shmobile: Move dma-register.h
[PATCH v2 03/08] ARM: shmobile: Move clock.h
[PATCH v2 04/08] ARM: shmobile: Move most of irqs.h, keep some for pinctl [PATCH v2 05/08] ARM: shmobile: Move common.h
[PATCH v2 06/08] ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h [PATCH v2 07/08] ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case [PATCH v2 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!
Simon, can you please this pick up and include in your rebase to v3.16-rc1?
Changes since V1:
- rebased to v3.16-rc1
Thanks to Geert and Arnd for review support!
---
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 | 4 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 | 12 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, 723 insertions(+), 726 deletions(-)
Magnus Damm
maintainerPATCH v2 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>.
---
Changes since V1:
- rebased to v3.16-rc1
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>
Magnus Damm
maintainerPATCH v2 2/8 ARM: shmobile: Move dma-register.h
In reply to Magnus DammFrom: 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>.
---
Changes since V1:
- rebased to v3.16-rc1
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
Magnus Damm
maintainerPATCH v2 3/8 ARM: shmobile: Move clock.h
In reply to Magnus DammFrom: 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>.
---
Changes since V1:
- rebased to v3.16-rc1
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/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 ---------------------- 14 files changed, 69 insertions(+), 69 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/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
@@ -23,8 +23,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" /* * 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
Magnus Damm
maintainerPATCH v2 4/8 ARM: shmobile: Move most of irqs.h, keep some for pinctl
In reply to Magnus DammFrom: 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.
---
Changes since V1:
- rebased to v3.16-rc1
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
@@ -21,9 +21,9 @@#include <mach/r8a7779.h> #include <mach/common.h> -#include <mach/irqs.h> #include <asm/irq.h> #include <asm/mach/arch.h> +#include "irqs.h" static void __init marzen_init (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
PATCH v2 4/8 ARM: shmobile: Move most of irqs.h, keep some for pinctl
Quoted 16 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Move most of
irqs.hso it can be used as #include "irqs.h" instead of the old style #include <mach/irqs.h>.Legacy code in
drivers/pinctrlneeds more work to get rid of the "mach" portion of the include path, so some part is left in the original location.Signed-off-by Magnus Damm <[email protected]>Acked-by Arnd Bergmann <[email protected]>---
Changes since V1:
- rebased to v3.16-rc1
[snip]
Quoted 19 lines
arch/arm/mach-shmobile/include/mach/irqs.h +1
-10@@ -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 */
arch/arm/mach-shmobile/include/mach/irqs.h line 11
Quoted 10 lines
arch/arm/mach-shmobile/include/mach/irqs.h +1
-5#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 */ +
I removed the trailing blank line this patch adds here.
[snip]
Magnus Damm
maintainerPATCH v2 5/8 ARM: shmobile: Move common.h
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Change location for common.h so it can be used as #include "common.h" instead of the old style #include <mach/common.h>.
---
Changes since V1:
- rebased to v3.16-rc1
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
@@ -20,9 +20,9 @@*/ #include <mach/r8a7779.h> -#include <mach/common.h> #include <asm/irq.h> #include <asm/mach/arch.h> +#include "common.h" #include "irqs.h" static void __init marzen_init (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
@@ -23,8 +23,8 @@#include <linux/io.h> #include <linux/sh_clk.h> #include <linux/clkdev.h> -#include <mach/common.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)
Magnus Damm
maintainerPATCH v2 6/8 ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Change location 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.
---
Changes since V1:
- rebased to v3.16-rc1
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
Magnus Damm
maintainerPATCH v2 7/8 ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Change location 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.
---
Changes since V1:
- rebased to v3.16-rc1
arch/arm/mach-shmobile/include/mach/pm-rcar.h | 15 --------------- arch/arm/mach-shmobile/include/mach/r8a7779.h | 12 ------------ 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(+), 32 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 -12
@@ -2,8 +2,6 @@#define __ASM_R8A7779_H__#include <linux/sh_clk.h> -#include <linux/pm_domain.h> -#include <mach/pm-rcar.h> /* HPB-DMA slave IDs */ enum {
@@ -12,16 +10,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
Magnus Damm
maintainerPATCH v2 8/8 ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Change location 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.
---
Changes since V1:
- rebased to v3.16-rc1
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
v2 cover ARM: shmobile: Rework include path V2
In reply to Magnus DammQuoted 9 lines · Magnus Damm
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 likearch/arm/boot/compressed/(booting legacy kernel directly from reset vector) and also from SoC specific legacy code underdrivers/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!
If it's only about arch/arm/boot/compressed, you can just move the header files to the same directory, as nothing else includes them.
I've played with a full multiplatform conversion of a few platforms including shmobile in the past, and all I needed for the legacy pinctrl drivers was to duplicate the irq_pin() definition, which is probably a reasonable hack for code that we know is going away anyway, just add a comment for both definitions explaining that they have to be kept in sync. This one is less obvious than the boot header.
One general comment: please use 'git format-patch -M' or set the 'diff.renames' git option for sending patches for reviews that rename files. No need to send this patch set again.
Arnd
v2 cover ARM: shmobile: Rework include path V2
In reply to Magnus DammQuoted 28 lines · Magnus Damm
ARM: shmobile: Rework include path V2
[PATCH v2 01/08] ARM: shmobile: Move
intc.h, cleanupsh_intc.husage [PATCH v2 02/08] ARM: shmobile: Movedma-register.h
[PATCH v2 03/08] ARM: shmobile: Moveclock.h
[PATCH v2 04/08] ARM: shmobile: Move most ofirqs.h, keep some for pinctl [PATCH v2 05/08] ARM: shmobile: Movecommon.h
[PATCH v2 06/08] ARM: shmobile: Movepm-rmobile.h, cleanupsh73xx.h[PATCH v2 07/08] ARM: shmobile: Movepm-rcar.h, cleanup r8a7779 case [PATCH v2 08/08] ARM: shmobile: Movercar-gen2.h, cleanup r8a7790 caseOlof, 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 likearch/arm/boot/compressed/(booting legacy kernel directly from reset vector) and also from SoC specific legacy code underdrivers/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!
Quoted 6 lines
Simon, can you please this pick up and include in your rebase to v3.16-rc1?
Changes since V1:
- rebased to v3.16-rc1Thanks to Geert and Arnd for review support!
Thanks Magnus, I have queued this up.