diff options
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach')
37 files changed, 1707 insertions, 1278 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/include/mach/clock.h new file mode 100644 index 00000000000..31b6417463e --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/clock.h @@ -0,0 +1,56 @@ +#ifndef CLOCK_H +#define CLOCK_H + +#ifdef CONFIG_COMMON_CLK +/* temporary clock configuration helper for platform devices */ + +struct clk_name { +	const char *clk; +	const char *con_id; +	const char *dev_id; +}; + +void shmobile_clk_workaround(const struct clk_name *clks, int nr_clks, +			     bool enable); + +#else /* CONFIG_COMMON_CLK */ +/* legacy clock implementation */ + +struct clk; +unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk); +extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops; + +/* clock ratio */ +struct clk_ratio { +	int mul; +	int div; +}; + +#define SH_CLK_RATIO(name, m, d)		\ +static struct clk_ratio name ##_ratio = {	\ +	.mul = m,				\ +	.div = d,				\ +} + +#define SH_FIXED_RATIO_CLKg(name, p, r)	\ +struct clk name = {			\ +	.parent	= &p,				\ +	.ops	= &shmobile_fixed_ratio_clk_ops,\ +	.priv	= &r ## _ratio,			\ +} + +#define SH_FIXED_RATIO_CLK(name, p, r)		\ +static SH_FIXED_RATIO_CLKg(name, p, r) + +#define SH_FIXED_RATIO_CLK_SET(name, p, m, d)	\ +	SH_CLK_RATIO(name, m, d);		\ +	SH_FIXED_RATIO_CLK(name, p, name) + +#define SH_CLK_SET_RATIO(p, m, d)	\ +do {			\ +	(p)->mul = m;	\ +	(p)->div = d;	\ +} while (0) + +#endif /* CONFIG_COMMON_CLK */ +#endif diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index efeef778a87..f7a360edcc3 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -1,33 +1,56 @@  #ifndef __ARCH_MACH_COMMON_H  #define __ARCH_MACH_COMMON_H -extern struct sys_timer shmobile_timer; +extern void shmobile_earlytimer_init(void); +extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, +			 unsigned int mult, unsigned int div); +extern void shmobile_init_delay(void); +struct twd_local_timer;  extern void shmobile_setup_console(void); +extern void shmobile_boot_vector(void); +extern unsigned long shmobile_boot_fn; +extern unsigned long shmobile_boot_arg; +extern unsigned long shmobile_boot_size; +extern void shmobile_smp_boot(void); +extern void shmobile_smp_sleep(void); +extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn, +			      unsigned long arg); +extern int shmobile_smp_cpu_disable(unsigned int cpu); +extern void shmobile_invalidate_start(void); +extern void shmobile_boot_scu(void); +extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus); +extern void shmobile_smp_scu_cpu_die(unsigned int cpu); +extern int shmobile_smp_scu_cpu_kill(unsigned int cpu); +extern void shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus); +extern int shmobile_smp_apmu_boot_secondary(unsigned int cpu, +					    struct task_struct *idle); +extern void shmobile_smp_apmu_cpu_die(unsigned int cpu); +extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu);  struct clk; -extern int clk_init(void); +extern int shmobile_clk_init(void); +extern void shmobile_handle_irq_intc(struct pt_regs *); +extern struct platform_suspend_ops shmobile_suspend_ops; +struct cpuidle_driver; +extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv); -extern void sh7367_init_irq(void); -extern void sh7367_add_early_devices(void); -extern void sh7367_add_standard_devices(void); -extern void sh7367_clock_init(void); -extern void sh7367_pinmux_init(void); -extern struct clk sh7367_extalb1_clk; -extern struct clk sh7367_extal2_clk; +#ifdef CONFIG_SUSPEND +int shmobile_suspend_init(void); +#else +static inline int shmobile_suspend_init(void) { return 0; } +#endif -extern void sh7377_init_irq(void); -extern void sh7377_add_early_devices(void); -extern void sh7377_add_standard_devices(void); -extern void sh7377_clock_init(void); -extern void sh7377_pinmux_init(void); -extern struct clk sh7377_extalc1_clk; -extern struct clk sh7377_extal2_clk; +#ifdef CONFIG_CPU_IDLE +int shmobile_cpuidle_init(void); +#else +static inline int shmobile_cpuidle_init(void) { return 0; } +#endif -extern void sh7372_init_irq(void); -extern void sh7372_add_early_devices(void); -extern void sh7372_add_standard_devices(void); -extern void sh7372_clock_init(void); -extern void sh7372_pinmux_init(void); -extern struct clk sh7372_extal1_clk; -extern struct clk sh7372_extal2_clk; +extern void __iomem *shmobile_scu_base; + +static inline void __init shmobile_init_late(void) +{ +	shmobile_suspend_init(); +	shmobile_cpuidle_init(); +}  #endif /* __ARCH_MACH_COMMON_H */ diff --git a/arch/arm/mach-shmobile/include/mach/dma-register.h b/arch/arm/mach-shmobile/include/mach/dma-register.h new file mode 100644 index 00000000000..97c40bd9b94 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/dma-register.h @@ -0,0 +1,84 @@ +/* + * SH-ARM CPU-specific DMA definitions, used by both DMA drivers + * + * Copyright (C) 2012 Renesas Solutions Corp + * + * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> + * + * Based on arch/sh/include/cpu-sh4/cpu/dma-register.h + * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> + * + * 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 */ diff --git a/arch/arm/mach-shmobile/include/mach/dma.h b/arch/arm/mach-shmobile/include/mach/dma.h deleted file mode 100644 index 40a8c178f10..00000000000 --- a/arch/arm/mach-shmobile/include/mach/dma.h +++ /dev/null @@ -1 +0,0 @@ -/* empty */ diff --git a/arch/arm/mach-shmobile/include/mach/entry-macro.S b/arch/arm/mach-shmobile/include/mach/entry-macro.S deleted file mode 100644 index a285d13c741..00000000000 --- a/arch/arm/mach-shmobile/include/mach/entry-macro.S +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2008 Renesas Solutions Corp. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA - */ -#include <mach/hardware.h> -#include <mach/irqs.h> - -	.macro  disable_fiq -	.endm - -	.macro  get_irqnr_preamble, base, tmp -	ldr     \base, =INTFLGA -	.endm - -	.macro  arch_ret_to_user, tmp1, tmp2 -	.endm - -	.macro  get_irqnr_and_base, irqnr, irqstat, base, tmp -	ldr     \irqnr, [\base] -	cmp	\irqnr, #0 -	beq	1000f -	/* intevt to irq number */ -	lsr	\irqnr, \irqnr, #0x5 -	subs	\irqnr, \irqnr, #16 - -1000: -	.endm diff --git a/arch/arm/mach-shmobile/include/mach/gpio.h b/arch/arm/mach-shmobile/include/mach/gpio.h deleted file mode 100644 index 2b1bb9e43dd..00000000000 --- a/arch/arm/mach-shmobile/include/mach/gpio.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Generic GPIO API and pinmux table support - * - * Copyright (c) 2008  Magnus Damm - * - * This file is subject to the terms and conditions of the GNU General Public - * License.  See the file "COPYING" in the main directory of this archive - * for more details. - */ -#ifndef __ASM_ARCH_GPIO_H -#define __ASM_ARCH_GPIO_H - -#include <linux/kernel.h> -#include <linux/errno.h> - -#define ARCH_NR_GPIOS 1024 -#include <linux/sh_pfc.h> - -#ifdef CONFIG_GPIOLIB - -static inline int gpio_get_value(unsigned gpio) -{ -	return __gpio_get_value(gpio); -} - -static inline void gpio_set_value(unsigned gpio, int value) -{ -	__gpio_set_value(gpio, value); -} - -static inline int gpio_cansleep(unsigned gpio) -{ -	return __gpio_cansleep(gpio); -} - -static inline int gpio_to_irq(unsigned gpio) -{ -	return __gpio_to_irq(gpio); -} - -static inline int irq_to_gpio(unsigned int irq) -{ -	return -ENOSYS; -} - -#endif /* CONFIG_GPIOLIB */ - -#endif /* __ASM_ARCH_GPIO_H */ diff --git a/arch/arm/mach-shmobile/include/mach/hardware.h b/arch/arm/mach-shmobile/include/mach/hardware.h deleted file mode 100644 index 3f0ef194603..00000000000 --- a/arch/arm/mach-shmobile/include/mach/hardware.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_HARDWARE_H -#define __ASM_MACH_HARDWARE_H - -/* INTFLGA register - used by low level interrupt code in entry-macro.S */ -#define INTFLGA			0xe6980018 - -#endif /* __ASM_MACH_HARDWARE_H */ diff --git a/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt b/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt new file mode 100644 index 00000000000..9531f46a822 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt @@ -0,0 +1,410 @@ +LIST "KZM9G low-level initialization routine." +LIST "Adapted from u-boot KZM9G support code." + +LIST "Copyright (C) 2013 Ulrich Hecht" + +LIST "This program is free software; you can redistribute it and/or modify" +LIST "it under the terms of the GNU General Public License version 2 as" +LIST "published by the Free Software Foundation." + +LIST "This program is distributed in the hope that it will be useful," +LIST "but WITHOUT ANY WARRANTY; without even the implied warranty of" +LIST "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the" +LIST "GNU General Public License for more details." + + +LIST "Register definitions:" + +LIST "Secure control register" +#define LIFEC_SEC_SRC (0xE6110008) + +LIST "RWDT" +#define RWDT_BASE   (0xE6020000) +#define RWTCSRA0 (RWDT_BASE + 0x04) + +LIST "HPB Semaphore Control Registers" +#define HPBSCR_BASE (0xE6000000) +#define HPBCTRL6 (HPBSCR_BASE + 0x1030) + +#define SBSC1_BASE  (0xFE400000) +#define SDCR0A		(SBSC1_BASE + 0x0008) +#define SDCR1A		(SBSC1_BASE + 0x000C) +#define SDPCRA		(SBSC1_BASE + 0x0010) +#define SDCR0SA		(SBSC1_BASE + 0x0018) +#define SDCR1SA		(SBSC1_BASE + 0x001C) +#define RTCSRA		(SBSC1_BASE + 0x0020) +#define RTCORA		(SBSC1_BASE + 0x0028) +#define RTCORHA		(SBSC1_BASE + 0x002C) +#define SDWCRC0A	(SBSC1_BASE + 0x0040) +#define SDWCRC1A	(SBSC1_BASE + 0x0044) +#define SDWCR00A	(SBSC1_BASE + 0x0048) +#define SDWCR01A	(SBSC1_BASE + 0x004C) +#define SDWCR10A	(SBSC1_BASE + 0x0050) +#define SDWCR11A	(SBSC1_BASE + 0x0054) +#define SDWCR2A		(SBSC1_BASE + 0x0060) +#define SDWCRC2A	(SBSC1_BASE + 0x0064) +#define ZQCCRA		(SBSC1_BASE + 0x0068) +#define SDMRACR0A	(SBSC1_BASE + 0x0084) +#define SDMRTMPCRA	(SBSC1_BASE + 0x008C) +#define SDMRTMPMSKA	(SBSC1_BASE + 0x0094) +#define SDGENCNTA	(SBSC1_BASE + 0x009C) +#define SDDRVCR0A	(SBSC1_BASE + 0x00B4) +#define DLLCNT0A	(SBSC1_BASE + 0x0354) + +#define SDMRA1  (0xFE500000) +#define SDMRA2  (0xFE5C0000) +#define SDMRA3  (0xFE504000) + +#define SBSC2_BASE  (0xFB400000) +#define SDCR0B		(SBSC2_BASE + 0x0008) +#define SDCR1B		(SBSC2_BASE + 0x000C) +#define SDPCRB		(SBSC2_BASE + 0x0010) +#define SDCR0SB		(SBSC2_BASE + 0x0018) +#define SDCR1SB		(SBSC2_BASE + 0x001C) +#define RTCSRB		(SBSC2_BASE + 0x0020) +#define RTCORB		(SBSC2_BASE + 0x0028) +#define RTCORHB		(SBSC2_BASE + 0x002C) +#define SDWCRC0B	(SBSC2_BASE + 0x0040) +#define SDWCRC1B	(SBSC2_BASE + 0x0044) +#define SDWCR00B	(SBSC2_BASE + 0x0048) +#define SDWCR01B	(SBSC2_BASE + 0x004C) +#define SDWCR10B	(SBSC2_BASE + 0x0050) +#define SDWCR11B	(SBSC2_BASE + 0x0054) +#define SDPDCR0B	(SBSC2_BASE + 0x0058) +#define SDWCR2B		(SBSC2_BASE + 0x0060) +#define SDWCRC2B	(SBSC2_BASE + 0x0064) +#define ZQCCRB		(SBSC2_BASE + 0x0068) +#define SDMRACR0B	(SBSC2_BASE + 0x0084) +#define SDMRTMPCRB	(SBSC2_BASE + 0x008C) +#define SDMRTMPMSKB	(SBSC2_BASE + 0x0094) +#define SDGENCNTB	(SBSC2_BASE + 0x009C) +#define DPHYCNT0B	(SBSC2_BASE + 0x00A0) +#define DPHYCNT1B	(SBSC2_BASE + 0x00A4) +#define DPHYCNT2B	(SBSC2_BASE + 0x00A8) +#define SDDRVCR0B	(SBSC2_BASE + 0x00B4) +#define DLLCNT0B	(SBSC2_BASE + 0x0354) + +#define SDMRB1  (0xFB500000) +#define SDMRB2  (0xFB5C0000) +#define SDMRB3  (0xFB504000) + +#define CPG_BASE   (0xE6150000) +#define FRQCRA		(CPG_BASE + 0x0000) +#define FRQCRB		(CPG_BASE + 0x0004) +#define FRQCRD		(CPG_BASE + 0x00E4) +#define VCLKCR1		(CPG_BASE + 0x0008) +#define VCLKCR2		(CPG_BASE + 0x000C) +#define VCLKCR3		(CPG_BASE + 0x001C) +#define ZBCKCR		(CPG_BASE + 0x0010) +#define FLCKCR		(CPG_BASE + 0x0014) +#define SD0CKCR		(CPG_BASE + 0x0074) +#define SD1CKCR		(CPG_BASE + 0x0078) +#define SD2CKCR		(CPG_BASE + 0x007C) +#define FSIACKCR	(CPG_BASE + 0x0018) +#define SUBCKCR		(CPG_BASE + 0x0080) +#define SPUACKCR	(CPG_BASE + 0x0084) +#define SPUVCKCR	(CPG_BASE + 0x0094) +#define MSUCKCR		(CPG_BASE + 0x0088) +#define HSICKCR		(CPG_BASE + 0x008C) +#define FSIBCKCR	(CPG_BASE + 0x0090) +#define MFCK1CR		(CPG_BASE + 0x0098) +#define MFCK2CR		(CPG_BASE + 0x009C) +#define DSITCKCR	(CPG_BASE + 0x0060) +#define DSI0PCKCR	(CPG_BASE + 0x0064) +#define DSI1PCKCR	(CPG_BASE + 0x0068) +#define DSI0PHYCR	(CPG_BASE + 0x006C) +#define DVFSCR3		(CPG_BASE + 0x0174) +#define DVFSCR4		(CPG_BASE + 0x0178) +#define DVFSCR5		(CPG_BASE + 0x017C) +#define MPMODE		(CPG_BASE + 0x00CC) + +#define PLLECR		(CPG_BASE + 0x00D0) +#define PLL0CR		(CPG_BASE + 0x00D8) +#define PLL1CR		(CPG_BASE + 0x0028) +#define PLL2CR		(CPG_BASE + 0x002C) +#define PLL3CR		(CPG_BASE + 0x00DC) +#define PLL0STPCR	(CPG_BASE + 0x00F0) +#define PLL1STPCR	(CPG_BASE + 0x00C8) +#define PLL2STPCR	(CPG_BASE + 0x00F8) +#define PLL3STPCR	(CPG_BASE + 0x00FC) +#define RMSTPCR0	(CPG_BASE + 0x0110) +#define RMSTPCR1	(CPG_BASE + 0x0114) +#define RMSTPCR2	(CPG_BASE + 0x0118) +#define RMSTPCR3	(CPG_BASE + 0x011C) +#define RMSTPCR4	(CPG_BASE + 0x0120) +#define RMSTPCR5	(CPG_BASE + 0x0124) +#define SMSTPCR0	(CPG_BASE + 0x0130) +#define SMSTPCR2	(CPG_BASE + 0x0138) +#define SMSTPCR3	(CPG_BASE + 0x013C) +#define CPGXXCR4	(CPG_BASE + 0x0150) +#define SRCR0		(CPG_BASE + 0x80A0) +#define SRCR2		(CPG_BASE + 0x80B0) +#define SRCR3		(CPG_BASE + 0x80A8) +#define VREFCR		(CPG_BASE + 0x00EC) +#define PCLKCR		(CPG_BASE + 0x1020) + +#define PORT32CR (0xE6051020) +#define PORT33CR (0xE6051021) +#define PORT34CR (0xE6051022) +#define PORT35CR (0xE6051023) + +LIST "DRAM initialization code:" + +EW RWTCSRA0, 0xA507 + +ED_AND LIFEC_SEC_SRC, 0xFFFF7FFF + +ED_AND SMSTPCR3,0xFFFF7FFF +ED_AND SRCR3, 0xFFFF7FFF +ED_AND SMSTPCR2,0xFFFBFFFF +ED_AND SRCR2, 0xFFFBFFFF +ED PLLECR, 0x00000000 + +WAIT_MASK PLLECR, 0x00000F00, 0x00000000 +WAIT_MASK FRQCRB, 0x80000000, 0x00000000 + +ED PLL0CR, 0x2D000000 +ED PLL1CR, 0x17100000 +ED FRQCRB, 0x96235880 +WAIT_MASK FRQCRB, 0x80000000, 0x00000000 + +ED FLCKCR, 0x0000000B +ED_AND SMSTPCR0, 0xFFFFFFFD + +ED_AND SRCR0, 0xFFFFFFFD +ED 0xE6001628, 0x514 +ED 0xE6001648, 0x514 +ED 0xE6001658, 0x514 +ED 0xE6001678, 0x514 + +ED DVFSCR4, 0x00092000 +ED DVFSCR5, 0x000000DC +ED PLLECR, 0x00000000 +WAIT_MASK PLLECR, 0x00000F00, 0x00000000 + +ED FRQCRA, 0x0012453C +ED FRQCRB, 0x80431350 +WAIT_MASK FRQCRB, 0x80000000, 0x00000000 +ED FRQCRD, 0x00000B0B +WAIT_MASK FRQCRD, 0x80000000, 0x00000000 + +ED PCLKCR, 0x00000003 +ED VCLKCR1, 0x0000012F +ED VCLKCR2, 0x00000119 +ED VCLKCR3, 0x00000119 +ED ZBCKCR, 0x00000002 +ED FLCKCR, 0x00000005 +ED SD0CKCR, 0x00000080 +ED SD1CKCR, 0x00000080 +ED SD2CKCR, 0x00000080 +ED FSIACKCR, 0x0000003F +ED FSIBCKCR, 0x0000003F +ED SUBCKCR, 0x00000080 +ED SPUACKCR, 0x0000000B +ED SPUVCKCR, 0x0000000B +ED MSUCKCR, 0x0000013F +ED HSICKCR, 0x00000080 +ED MFCK1CR, 0x0000003F +ED MFCK2CR, 0x0000003F +ED DSITCKCR, 0x00000107 +ED DSI0PCKCR, 0x00000313 +ED DSI1PCKCR, 0x0000130D +ED DSI0PHYCR, 0x2A800E0E +ED PLL0CR, 0x1E000000 +ED PLL0CR, 0x2D000000 +ED PLL1CR, 0x17100000 +ED PLL2CR, 0x27000080 +ED PLL3CR, 0x1D000000 +ED PLL0STPCR, 0x00080000 +ED PLL1STPCR, 0x000120C0 +ED PLL2STPCR, 0x00012000 +ED PLL3STPCR, 0x00000030 +ED PLLECR, 0x0000000B +WAIT_MASK PLLECR, 0x00000B00, 0x00000B00 + +ED DVFSCR3, 0x000120F0 +ED MPMODE, 0x00000020 +ED VREFCR, 0x0000028A +ED RMSTPCR0, 0xE4628087 +ED RMSTPCR1, 0xFFFFFFFF +ED RMSTPCR2, 0x53FFFFFF +ED RMSTPCR3, 0xFFFFFFFF +ED RMSTPCR4, 0x00800D3D +ED RMSTPCR5, 0xFFFFF3FF +ED SMSTPCR2, 0x00000000 +ED SRCR2,  0x00040000 +ED_AND PLLECR, 0xFFFFFFF7 +WAIT_MASK PLLECR, 0x00000800, 0x00000000 + +LIST "set SBSC operational" +ED HPBCTRL6, 0x00000001 +WAIT_MASK HPBCTRL6, 0x00000001, 0x00000001 + +LIST "set SBSC operating frequency" +ED FRQCRD, 0x00001414 +WAIT_MASK FRQCRD, 0x80000000, 0x00000000 +ED PLL3CR, 0x1D000000 +ED_OR PLLECR, 0x00000008 +WAIT_MASK PLLECR, 0x00000800, 0x00000800 + +LIST "enable DLL oscillation in DDRPHY" +ED_OR DLLCNT0A, 0x00000002 + +LIST "wait >= 100 ns" +ED SDGENCNTA, 0x00000005 +WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 + +LIST "target LPDDR2 device settings" +ED SDCR0A, 0xACC90159 +ED SDCR1A, 0x00010059 +ED SDWCRC0A, 0x50874114 +ED SDWCRC1A, 0x33199B37 +ED SDWCRC2A, 0x008F2313 +ED SDWCR00A, 0x31020707 +ED SDWCR01A, 0x0017040A +ED SDWCR10A, 0x31020707 +ED SDWCR11A, 0x0017040A + +ED SDDRVCR0A, 0x055557ff + +ED SDWCR2A, 0x30000000 + +LIST "drive CKE high" +ED_OR SDPCRA, 0x00000080 +WAIT_MASK SDPCRA, 0x00000080, 0x00000080 + +LIST "wait >= 200 us" +ED SDGENCNTA, 0x00002710 +WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 + +LIST "issue reset command to LPDDR2 device" +ED SDMRACR0A, 0x0000003F +ED SDMRA1, 0x00000000 + +LIST "wait >= 10 (or 1) us (docs inconsistent)" +ED SDGENCNTA, 0x000001F4 +WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 + +LIST "MRW ZS initialization calibration command" +ED SDMRACR0A, 0x0000FF0A +ED SDMRA3, 0x00000000 + +LIST "wait >= 1 us" +ED SDGENCNTA, 0x00000032 +WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000 + +LIST "specify operating mode in LPDDR2" +ED SDMRACR0A, 0x00002201 +ED SDMRA1, 0x00000000 +ED SDMRACR0A, 0x00000402 +ED SDMRA1, 0x00000000 +ED SDMRACR0A, 0x00000203 +ED SDMRA1, 0x00000000 + +LIST "initialize DDR interface" +ED SDMRA2, 0x00000000 + +LIST "temperature sensor control" +ED SDMRTMPCRA, 0x88800004 +ED SDMRTMPMSKA,0x00000004 + +LIST "auto-refreshing control" +ED RTCORA, 0xA55A0032 +ED RTCORHA, 0xA55A000C +ED RTCSRA, 0xA55A2048 + +ED_OR SDCR0A, 0x00000800 +ED_OR SDCR1A, 0x00000400 + +LIST "auto ZQ calibration control" +ED ZQCCRA, 0xFFF20000 + +ED_OR DLLCNT0B, 0x00000002 +ED SDGENCNTB, 0x00000005 +WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 + +ED SDCR0B, 0xACC90159 +ED SDCR1B, 0x00010059 +ED SDWCRC0B, 0x50874114 +ED SDWCRC1B, 0x33199B37 +ED SDWCRC2B, 0x008F2313 +ED SDWCR00B, 0x31020707 +ED SDWCR01B, 0x0017040A +ED SDWCR10B, 0x31020707 +ED SDWCR11B, 0x0017040A +ED SDDRVCR0B, 0x055557ff +ED SDWCR2B, 0x30000000 +ED_OR SDPCRB, 0x00000080 +WAIT_MASK SDPCRB, 0x00000080, 0x00000080 + +ED SDGENCNTB, 0x00002710 +WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 +ED SDMRACR0B, 0x0000003F + +LIST "upstream u-boot writes to SDMRA1A for both SBSC 1 and 2, which does" +LIST "not seem to make a lot of sense..." +ED SDMRB1, 0x00000000 + +ED SDGENCNTB, 0x000001F4 +WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 + +ED SDMRACR0B, 0x0000FF0A +ED SDMRB3, 0x00000000 +ED SDGENCNTB, 0x00000032 +WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000 + +ED SDMRACR0B, 0x00002201 +ED SDMRB1, 0x00000000 +ED SDMRACR0B, 0x00000402 +ED SDMRB1, 0x00000000 +ED SDMRACR0B, 0x00000203 +ED SDMRB1, 0x00000000 +ED SDMRB2, 0x00000000 +ED SDMRTMPCRB, 0x88800004 +ED SDMRTMPMSKB, 0x00000004 +ED RTCORB,  0xA55A0032 +ED RTCORHB, 0xA55A000C +ED RTCSRB,  0xA55A2048 +ED_OR SDCR0B, 0x00000800 +ED_OR SDCR1B, 0x00000400 +ED ZQCCRB, 0xFFF20000 +ED_OR SDPDCR0B, 0x00030000 +ED DPHYCNT1B, 0xA5390000 +ED DPHYCNT0B, 0x00001200 +ED DPHYCNT1B, 0x07CE0000 +ED DPHYCNT0B, 0x00001247 +WAIT_MASK DPHYCNT2B, 0xFFFFFFFF, 0x07CE0000 + +ED_AND SDPDCR0B, 0xFFFCFFFF + +ED FRQCRD, 0x00000B0B +WAIT_MASK FRQCRD, 0x80000000, 0x00000000 + +ED CPGXXCR4, 0xfffffffc + +LIST "Setup SCIF4 / workaround" +EB PORT32CR, 0x12 +EB PORT33CR, 0x22 +EB PORT34CR, 0x12 +EB PORT35CR, 0x22 + +EW 0xE6C80000, 0 +EB 0xE6C80004, 0x19 +EW 0xE6C80008, 0x0030 +EW 0xE6C80018, 0 +EW 0xE6C80030, 0x0014 + +LIST "Magic to avoid hangs and corruption on DRAM writes." + +LIST "It has been observed that the system would most often hang while" +LIST "decompressing the kernel, and if it didn't it would always write" +LIST "a corrupt image to DRAM." +LIST "This problem does not occur in u-boot, and the reason is that" +LIST "u-boot performs an additional cache invalidation after setting up" +LIST "the DRAM controller. Such an invalidation should not be necessary at" +LIST "this point, and attempts at removing parts of the routine to arrive" +LIST "at the minimal snippet of code necessary to avoid the DRAM stability" +LIST "problem yielded the following:" + +MRC p15, 0, r0, c1, c0, 0 +MCR p15, 0, r0, c1, c0, 0 diff --git a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt new file mode 100644 index 00000000000..9f134dfeffd --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt @@ -0,0 +1,93 @@ +LIST "partner-jet-setup.txt" +LIST "(C) Copyright 2010 Renesas Solutions Corp" +LIST "Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>" + +LIST "RWT Setting" +EW 0xE6020004, 0xA500 +EW 0xE6030004, 0xA500 + +LIST "GPIO Setting" +EB 0xE6051013, 0xA2 + +LIST "CPG" +ED 0xE61500C0, 0x00000002 + +WAIT 1, 0xFE40009C + +LIST "FRQCR" +ED 0xE6150000, 0x2D1305C3 +ED 0xE61500E0, 0x9E40358E +ED 0xE6150004, 0x80331050 + +WAIT 1, 0xFE40009C + +ED 0xE61500E4, 0x00002000 + +WAIT 1, 0xFE40009C + +LIST "PLL" +ED 0xE6150028, 0x00004000 + +WAIT 1, 0xFE40009C + +ED 0xE615002C, 0x93000040 + +WAIT 1, 0xFE40009C + +LIST "SUB/USBClk" +ED 0xE6150080, 0x00000180 + +LIST "BSC" +ED 0xFEC10000, 0x00E0001B + +LIST "SBSC1" +ED 0xFE400354, 0x01AD8000 +ED 0xFE400354, 0x01AD8001 + +WAIT 5, 0xFE40009C + +ED 0xFE400008, 0xBCC90151 +ED 0xFE400040, 0x41774113 +ED 0xFE400044, 0x2712E229 +ED 0xFE400048, 0x20C18505 +ED 0xFE40004C, 0x00110209 +ED 0xFE400010, 0x00000087 + +WAIT 30, 0xFE40009C + +ED 0xFE400084, 0x0000003F +EB 0xFE500000, 0x00 + +WAIT 5, 0xFE40009C + +ED 0xFE400084, 0x0000FF0A +EB 0xFE500000, 0x00 + +WAIT 1, 0xFE40009C + +ED 0xFE400084, 0x00002201 +EB 0xFE500000, 0x00 +ED 0xFE400084, 0x00000302 +EB 0xFE500000, 0x00 +EB 0xFE5C0000, 0x00 +ED 0xFE400008, 0xBCC90159 +ED 0xFE40008C, 0x88800004 +ED 0xFE400094, 0x00000004 +ED 0xFE400028, 0xA55A0032 +ED 0xFE40002C, 0xA55A000C +ED 0xFE400020, 0xA55A2048 +ED 0xFE400008, 0xBCC90959 + +LIST "Change CPGA setting" +ED 0xE61500E0, 0x9E40352E +ED 0xE6150004, 0x80331050 + +WAIT 1, 0xFE40009C + +ED 0xFE400354, 0x01AD8002 + +LIST "SCIF0 - Serial port for earlyprintk" +EB 0xE6053098, 0xe1 +EW 0xE6C40000, 0x0000 +EB 0xE6C40004, 0x19 +EW 0xE6C40008, 0x0030 diff --git a/arch/arm/mach-shmobile/include/mach/intc.h b/arch/arm/mach-shmobile/include/mach/intc.h new file mode 100644 index 00000000000..a5603c76cfe --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/intc.h @@ -0,0 +1,290 @@ +#ifndef __ASM_MACH_INTC_H +#define __ASM_MACH_INTC_H +#include <linux/sh_intc.h> + +#define INTC_IRQ_PINS_ENUM_16L(p)				\ +	p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3,		\ +	p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7,		\ +	p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11,	\ +	p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 + +#define INTC_IRQ_PINS_ENUM_16H(p)				\ +	p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19,	\ +	p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23,	\ +	p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27,	\ +	p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 + +#define INTC_IRQ_PINS_VECT_16L(p, vect)				\ +	vect(p ## _IRQ0, 0x0200), vect(p ## _IRQ1, 0x0220),	\ +	vect(p ## _IRQ2, 0x0240), vect(p ## _IRQ3, 0x0260),	\ +	vect(p ## _IRQ4, 0x0280), vect(p ## _IRQ5, 0x02a0),	\ +	vect(p ## _IRQ6, 0x02c0), vect(p ## _IRQ7, 0x02e0),	\ +	vect(p ## _IRQ8, 0x0300), vect(p ## _IRQ9, 0x0320),	\ +	vect(p ## _IRQ10, 0x0340), vect(p ## _IRQ11, 0x0360),	\ +	vect(p ## _IRQ12, 0x0380), vect(p ## _IRQ13, 0x03a0),	\ +	vect(p ## _IRQ14, 0x03c0), vect(p ## _IRQ15, 0x03e0) + +#define INTC_IRQ_PINS_VECT_16H(p, vect)				\ +	vect(p ## _IRQ16, 0x3200), vect(p ## _IRQ17, 0x3220),	\ +	vect(p ## _IRQ18, 0x3240), vect(p ## _IRQ19, 0x3260),	\ +	vect(p ## _IRQ20, 0x3280), vect(p ## _IRQ21, 0x32a0),	\ +	vect(p ## _IRQ22, 0x32c0), vect(p ## _IRQ23, 0x32e0),	\ +	vect(p ## _IRQ24, 0x3300), vect(p ## _IRQ25, 0x3320),	\ +	vect(p ## _IRQ26, 0x3340), vect(p ## _IRQ27, 0x3360),	\ +	vect(p ## _IRQ28, 0x3380), vect(p ## _IRQ29, 0x33a0),	\ +	vect(p ## _IRQ30, 0x33c0), vect(p ## _IRQ31, 0x33e0) + +#define INTC_IRQ_PINS_MASK_16L(p, base)					\ +	{ base + 0x40, base + 0x60, 8, /* INTMSK00A / INTMSKCLR00A */	\ +	  { p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3,		\ +	    p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7 } },		\ +	{ base + 0x44, base + 0x64, 8, /* INTMSK10A / INTMSKCLR10A */	\ +	  { p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11,		\ +	    p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 } } + +#define INTC_IRQ_PINS_MASK_16H(p, base)					\ +	{ base + 0x48, base + 0x68, 8, /* INTMSK20A / INTMSKCLR20A */	\ +	  { p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19,		\ +	    p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23 } },	\ +	{ base + 0x4c, base + 0x6c, 8, /* INTMSK30A / INTMSKCLR30A */	\ +	  { p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27,		\ +	    p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 } } + +#define INTC_IRQ_PINS_PRIO_16L(p, base)					\ +	{ base + 0x10, 0, 32, 4, /* INTPRI00A */			\ +	  { p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3,		\ +	    p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7 } },		\ +	{ base + 0x14, 0, 32, 4, /* INTPRI10A */			\ +	  { p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11,		\ +	    p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 } } + +#define INTC_IRQ_PINS_PRIO_16H(p, base)					\ +	{ base + 0x18, 0, 32, 4, /* INTPRI20A */			\ +	  { p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19,		\ +	    p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23 } },	\ +	{ base + 0x1c, 0, 32, 4, /* INTPRI30A */			\ +	  { p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27,		\ +	    p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 } } + +#define INTC_IRQ_PINS_SENSE_16L(p, base)				\ +	{ base + 0x00, 32, 4, /* ICR1A */				\ +	  { p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3,		\ +	    p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7 } },		\ +	{ base + 0x04, 32, 4, /* ICR2A */				\ +	  { p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11,		\ +	    p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 } } + +#define INTC_IRQ_PINS_SENSE_16H(p, base)				\ +	{ base + 0x08, 32, 4, /* ICR3A */				\ +	  { p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19,		\ +	    p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23 } },	\ +	{ base + 0x0c, 32, 4, /* ICR4A */				\ +	  { p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27,		\ +	    p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 } } + +#define INTC_IRQ_PINS_ACK_16L(p, base)					\ +	{ base + 0x20, 0, 8, /* INTREQ00A */				\ +	  { p ## _IRQ0, p ## _IRQ1, p ## _IRQ2, p ## _IRQ3,		\ +	    p ## _IRQ4, p ## _IRQ5, p ## _IRQ6, p ## _IRQ7 } },		\ +	{ base + 0x24, 0, 8, /* INTREQ10A */				\ +	  { p ## _IRQ8, p ## _IRQ9, p ## _IRQ10, p ## _IRQ11,		\ +	    p ## _IRQ12, p ## _IRQ13, p ## _IRQ14, p ## _IRQ15 } } + +#define INTC_IRQ_PINS_ACK_16H(p, base)					\ +	{ base + 0x28, 0, 8, /* INTREQ20A */				\ +	  { p ## _IRQ16, p ## _IRQ17, p ## _IRQ18, p ## _IRQ19,		\ +	    p ## _IRQ20, p ## _IRQ21, p ## _IRQ22, p ## _IRQ23 } },	\ +	{ base + 0x2c, 0, 8, /* INTREQ30A */				\ +	  { p ## _IRQ24, p ## _IRQ25, p ## _IRQ26, p ## _IRQ27,		\ +	    p ## _IRQ28, p ## _IRQ29, p ## _IRQ30, p ## _IRQ31 } } + +#define INTC_IRQ_PINS_16(p, base, vect, str)				\ +									\ +static struct resource p ## _resources[] __initdata = {			\ +	[0] = {								\ +		.start	= base,						\ +		.end	= base + 0x64,					\ +		.flags	= IORESOURCE_MEM,				\ +	},								\ +};									\ +									\ +enum {									\ +	p ## _UNUSED = 0,						\ +	INTC_IRQ_PINS_ENUM_16L(p),					\ +};									\ +									\ +static struct intc_vect p ## _vectors[] __initdata = {			\ +	INTC_IRQ_PINS_VECT_16L(p, vect),				\ +};									\ +									\ +static struct intc_mask_reg p ## _mask_registers[] __initdata = {	\ +	INTC_IRQ_PINS_MASK_16L(p, base),				\ +};									\ +									\ +static struct intc_prio_reg p ## _prio_registers[] __initdata = {	\ +	INTC_IRQ_PINS_PRIO_16L(p, base),				\ +};									\ +									\ +static struct intc_sense_reg p ## _sense_registers[] __initdata = {	\ +	INTC_IRQ_PINS_SENSE_16L(p, base),				\ +};									\ +									\ +static struct intc_mask_reg p ## _ack_registers[] __initdata = {	\ +	INTC_IRQ_PINS_ACK_16L(p, base),					\ +};									\ +									\ +static struct intc_desc p ## _desc __initdata = {			\ +	.name = str,							\ +	.resource = p ## _resources,					\ +	.num_resources = ARRAY_SIZE(p ## _resources),			\ +	.hw = INTC_HW_DESC(p ## _vectors, NULL,				\ +			     p ## _mask_registers, p ## _prio_registers, \ +			     p ## _sense_registers, p ## _ack_registers) \ +} + +#define INTC_IRQ_PINS_16H(p, base, vect, str)				\ +									\ +static struct resource p ## _resources[] __initdata = {			\ +	[0] = {								\ +		.start	= base,						\ +		.end	= base + 0x64,					\ +		.flags	= IORESOURCE_MEM,				\ +	},								\ +};									\ +									\ +enum {									\ +	p ## _UNUSED = 0,						\ +	INTC_IRQ_PINS_ENUM_16H(p),					\ +};									\ +									\ +static struct intc_vect p ## _vectors[] __initdata = {			\ +	INTC_IRQ_PINS_VECT_16H(p, vect),				\ +};									\ +									\ +static struct intc_mask_reg p ## _mask_registers[] __initdata = {	\ +	INTC_IRQ_PINS_MASK_16H(p, base),				\ +};									\ +									\ +static struct intc_prio_reg p ## _prio_registers[] __initdata = {	\ +	INTC_IRQ_PINS_PRIO_16H(p, base),				\ +};									\ +									\ +static struct intc_sense_reg p ## _sense_registers[] __initdata = {	\ +	INTC_IRQ_PINS_SENSE_16H(p, base),				\ +};									\ +									\ +static struct intc_mask_reg p ## _ack_registers[] __initdata = {	\ +	INTC_IRQ_PINS_ACK_16H(p, base),					\ +};									\ +									\ +static struct intc_desc p ## _desc __initdata = {			\ +	.name = str,							\ +	.resource = p ## _resources,					\ +	.num_resources = ARRAY_SIZE(p ## _resources),			\ +	.hw = INTC_HW_DESC(p ## _vectors, NULL,				\ +			     p ## _mask_registers, p ## _prio_registers, \ +			     p ## _sense_registers, p ## _ack_registers) \ +} + +#define INTC_IRQ_PINS_32(p, base, vect, str)				\ +									\ +static struct resource p ## _resources[] __initdata = {			\ +	[0] = {								\ +		.start	= base,						\ +		.end	= base + 0x6c,					\ +		.flags	= IORESOURCE_MEM,				\ +	},								\ +};									\ +									\ +enum {									\ +	p ## _UNUSED = 0,						\ +	INTC_IRQ_PINS_ENUM_16L(p),					\ +	INTC_IRQ_PINS_ENUM_16H(p),					\ +};									\ +									\ +static struct intc_vect p ## _vectors[] __initdata = {			\ +	INTC_IRQ_PINS_VECT_16L(p, vect),				\ +	INTC_IRQ_PINS_VECT_16H(p, vect),				\ +};									\ +									\ +static struct intc_mask_reg p ## _mask_registers[] __initdata = {	\ +	INTC_IRQ_PINS_MASK_16L(p, base),				\ +	INTC_IRQ_PINS_MASK_16H(p, base),				\ +};									\ +									\ +static struct intc_prio_reg p ## _prio_registers[] __initdata = {	\ +	INTC_IRQ_PINS_PRIO_16L(p, base),				\ +	INTC_IRQ_PINS_PRIO_16H(p, base),				\ +};									\ +									\ +static struct intc_sense_reg p ## _sense_registers[] __initdata = {	\ +	INTC_IRQ_PINS_SENSE_16L(p, base),				\ +	INTC_IRQ_PINS_SENSE_16H(p, base),				\ +};									\ +									\ +static struct intc_mask_reg p ## _ack_registers[] __initdata = {	\ +	INTC_IRQ_PINS_ACK_16L(p, base),					\ +	INTC_IRQ_PINS_ACK_16H(p, base),					\ +};									\ +									\ +static struct intc_desc p ## _desc __initdata = {			\ +	.name = str,							\ +	.resource = p ## _resources,					\ +	.num_resources = ARRAY_SIZE(p ## _resources),			\ +	.hw = INTC_HW_DESC(p ## _vectors, NULL,				\ +			     p ## _mask_registers, p ## _prio_registers, \ +			     p ## _sense_registers, p ## _ack_registers) \ +} + +#define INTC_PINT_E_EMPTY +#define INTC_PINT_E_NONE 0, 0, 0, 0, 0, 0, 0, 0, +#define INTC_PINT_E(p)							\ +	PINT ## p ## 0, PINT ## p ## 1, PINT ## p ## 2, PINT ## p ## 3,	\ +	PINT ## p ## 4, PINT ## p ## 5, PINT ## p ## 6, PINT ## p ## 7, + +#define INTC_PINT_V_NONE +#define INTC_PINT_V(p, vect)					\ +	vect(PINT ## p ## 0, 0), vect(PINT ## p ## 1, 1),	\ +	vect(PINT ## p ## 2, 2), vect(PINT ## p ## 3, 3),	\ +	vect(PINT ## p ## 4, 4), vect(PINT ## p ## 5, 5),	\ +	vect(PINT ## p ## 6, 6), vect(PINT ## p ## 7, 7), + +#define INTC_PINT(p, mask_reg, sense_base, str,				\ +	enums_1, enums_2, enums_3, enums_4,				\ +	vect_1, vect_2, vect_3, vect_4,					\ +	mask_a, mask_b, mask_c, mask_d,					\ +	sense_a, sense_b, sense_c, sense_d)				\ +									\ +enum {									\ +	PINT ## p ## _UNUSED = 0,					\ +	enums_1 enums_2 enums_3 enums_4 				\ +};									\ +									\ +static struct intc_vect p ## _vectors[] __initdata = {			\ +	vect_1 vect_2 vect_3 vect_4					\ +};									\ +									\ +static struct intc_mask_reg p ## _mask_registers[] __initdata = {	\ +	{ mask_reg, 0, 32, /* PINTER */					\ +	  { mask_a mask_b mask_c mask_d } }				\ +};									\ +									\ +static struct intc_sense_reg p ## _sense_registers[] __initdata = {	\ +	{ sense_base + 0x00, 16, 2, /* PINTCR */			\ +	  { sense_a } },						\ +	{ sense_base + 0x04, 16, 2, /* PINTCR */			\ +	  { sense_b } },						\ +	{ sense_base + 0x08, 16, 2, /* PINTCR */			\ +	  { sense_c } },						\ +	{ sense_base + 0x0c, 16, 2, /* PINTCR */			\ +	  { sense_d } },						\ +};									\ +									\ +static struct intc_desc p ## _desc __initdata = {			\ +	.name = str,							\ +	.hw = INTC_HW_DESC(p ## _vectors, NULL,				\ +			     p ## _mask_registers, NULL,		\ +			     p ## _sense_registers, NULL),		\ +} + +#endif  /* __ASM_MACH_INTC_H */ diff --git a/arch/arm/mach-shmobile/include/mach/io.h b/arch/arm/mach-shmobile/include/mach/io.h deleted file mode 100644 index 7339fe46cb7..00000000000 --- a/arch/arm/mach-shmobile/include/mach/io.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __ASM_MACH_IO_H -#define __ASM_MACH_IO_H - -#define IO_SPACE_LIMIT		0xffffffff - -#define __io(a)			((void __iomem *)(a)) -#define __mem_pci(a)		(a) - -#endif /* __ASM_MACH_IO_H */ diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h index fa15b5f8a00..d241bfd6926 100644 --- a/arch/arm/mach-shmobile/include/mach/irqs.h +++ b/arch/arm/mach-shmobile/include/mach/irqs.h @@ -1,15 +1,24 @@  #ifndef __ASM_MACH_IRQS_H  #define __ASM_MACH_IRQS_H -#define NR_IRQS         512 +#include <linux/sh_intc.h> -/* INTCA */ -#define evt2irq(evt)		(((evt) >> 5) - 16) -#define irq2evt(irq)		(((irq) + 16) << 5) +/* GIC */ +#define gic_spi(nr)		((nr) + 32) +#define gic_iid(nr)		(nr) /* ICCIAR / interrupt ID */  /* INTCS */ -#define INTCS_VECT_BASE		0x2200 +#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)) +/* 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 */ diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h deleted file mode 100644 index 377584e57e0..00000000000 --- a/arch/arm/mach-shmobile/include/mach/memory.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __ASM_MACH_MEMORY_H -#define __ASM_MACH_MEMORY_H - -#define PHYS_OFFSET	UL(CONFIG_MEMORY_START) -#define MEM_SIZE	UL(CONFIG_MEMORY_SIZE) - -/* DMA memory at 0xf6000000 - 0xffdfffff */ -#define CONSISTENT_DMA_SIZE (158 << 20) - -#endif /* __ASM_MACH_MEMORY_H */ diff --git a/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h new file mode 100644 index 00000000000..15d3a9efdec --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h @@ -0,0 +1,38 @@ +#ifndef MMC_MACKEREL_H +#define MMC_MACKEREL_H + +#define PORT0CR      (void __iomem *)0xe6051000 +#define PORT1CR      (void __iomem *)0xe6051001 +#define PORT2CR      (void __iomem *)0xe6051002 +#define PORT159CR    (void __iomem *)0xe605009f + +#define PORTR031_000DR (void __iomem *)0xe6055000 +#define PORTL159_128DR (void __iomem *)0xe6054010 + +static inline void mmc_init_progress(void) +{ +       /* Initialise LEDS0-3 +        * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control) +        * value:     0x10 - enable output +        */ +       __raw_writeb(0x10, PORT0CR); +       __raw_writeb(0x10, PORT1CR); +       __raw_writeb(0x10, PORT2CR); +       __raw_writeb(0x10, PORT159CR); +} + +static inline void mmc_update_progress(int n) +{ +	unsigned a = 0, b = 0; + +	if (n < 3) +		a = 1 << n; +	else +		b = 1 << 31; + +	__raw_writel((__raw_readl(PORTR031_000DR) & ~0x7) | a, +		     PORTR031_000DR); +	__raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b, +		     PORTL159_128DR); +} +#endif /* MMC_MACKEREL_H */ diff --git a/arch/arm/mach-shmobile/include/mach/mmc.h b/arch/arm/mach-shmobile/include/mach/mmc.h new file mode 100644 index 00000000000..e979b8fc1da --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/mmc.h @@ -0,0 +1,16 @@ +#ifndef MMC_H +#define MMC_H + +/************************************************** + * + *		board specific settings + * + **************************************************/ + +#ifdef CONFIG_MACH_MACKEREL +#include "mach/mmc-mackerel.h" +#else +#error "unsupported board." +#endif + +#endif /* MMC_H */ diff --git a/arch/arm/mach-shmobile/include/mach/pm-rcar.h b/arch/arm/mach-shmobile/include/mach/pm-rcar.h new file mode 100644 index 00000000000..ef3a1ef628f --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/pm-rcar.h @@ -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 */ diff --git a/arch/arm/mach-shmobile/include/mach/pm-rmobile.h b/arch/arm/mach-shmobile/include/mach/pm-rmobile.h new file mode 100644 index 00000000000..690553a0688 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/pm-rmobile.h @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2012 Renesas Solutions Corp. + * + * Kuninori Morimoto <morimoto.kuninori@renesas.com> + * + * This file is subject to the terms and conditions of the GNU General Public + * License.  See the file "COPYING" in the main directory of this archive + * for more details. + */ +#ifndef PM_RMOBILE_H +#define PM_RMOBILE_H + +#include <linux/pm_domain.h> + +#define DEFAULT_DEV_LATENCY_NS	250000 + +struct platform_device; + +struct rmobile_pm_domain { +	struct generic_pm_domain genpd; +	struct dev_power_governor *gov; +	int (*suspend)(void); +	void (*resume)(void); +	unsigned int bit_shift; +	bool no_debug; +}; + +static inline +struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d) +{ +	return container_of(d, struct rmobile_pm_domain, genpd); +} + +struct pm_domain_device { +	const char *domain_name; +	struct platform_device *pdev; +}; + +#ifdef CONFIG_PM +extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num); +extern void rmobile_add_device_to_domain_td(const char *domain_name, +					    struct platform_device *pdev, +					    struct gpd_timing_data *td); + +static inline void rmobile_add_device_to_domain(const char *domain_name, +						struct platform_device *pdev) +{ +	rmobile_add_device_to_domain_td(domain_name, pdev, NULL); +} + +extern void rmobile_add_devices_to_domains(struct pm_domain_device data[], +					   int size); +#else + +#define rmobile_init_domains(domains, num) do { } while (0) +#define rmobile_add_device_to_domain_td(name, pdev, td) do { } while (0) +#define rmobile_add_device_to_domain(name, pdev) do { } while (0) + +static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[], +						  int size) {} +#endif /* CONFIG_PM */ + +#endif /* PM_RMOBILE_H */ diff --git a/arch/arm/mach-shmobile/include/mach/r7s72100.h b/arch/arm/mach-shmobile/include/mach/r7s72100.h new file mode 100644 index 00000000000..5f34b20ecd4 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/r7s72100.h @@ -0,0 +1,8 @@ +#ifndef __ASM_R7S72100_H__ +#define __ASM_R7S72100_H__ + +void r7s72100_add_dt_devices(void); +void r7s72100_clock_init(void); +void r7s72100_init_early(void); + +#endif /* __ASM_R7S72100_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/r8a73a4.h b/arch/arm/mach-shmobile/include/mach/r8a73a4.h new file mode 100644 index 00000000000..ce8bdd1d8a8 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/r8a73a4.h @@ -0,0 +1,19 @@ +#ifndef __ASM_R8A73A4_H__ +#define __ASM_R8A73A4_H__ + +/* DMA slave IDs */ +enum { +	SHDMA_SLAVE_INVALID, +	SHDMA_SLAVE_MMCIF0_TX, +	SHDMA_SLAVE_MMCIF0_RX, +	SHDMA_SLAVE_MMCIF1_TX, +	SHDMA_SLAVE_MMCIF1_RX, +}; + +void r8a73a4_add_standard_devices(void); +void r8a73a4_add_dt_devices(void); +void r8a73a4_clock_init(void); +void r8a73a4_pinmux_init(void); +void r8a73a4_init_early(void); + +#endif /* __ASM_R8A73A4_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h new file mode 100644 index 00000000000..5e3c9ec0630 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2011  Renesas Solutions Corp. + * Copyright (C) 2011  Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA + */ + +#ifndef __ASM_R8A7740_H__ +#define __ASM_R8A7740_H__ + +#include <mach/pm-rmobile.h> + +/* + * MD_CKx pin + */ +#define MD_CK2	(1 << 2) +#define MD_CK1	(1 << 1) +#define MD_CK0	(1 << 0) + +/* DMA slave IDs */ +enum { +	SHDMA_SLAVE_INVALID, +	SHDMA_SLAVE_SDHI0_RX, +	SHDMA_SLAVE_SDHI0_TX, +	SHDMA_SLAVE_SDHI1_RX, +	SHDMA_SLAVE_SDHI1_TX, +	SHDMA_SLAVE_SDHI2_RX, +	SHDMA_SLAVE_SDHI2_TX, +	SHDMA_SLAVE_FSIA_RX, +	SHDMA_SLAVE_FSIA_TX, +	SHDMA_SLAVE_FSIB_TX, +	SHDMA_SLAVE_USBHS_TX, +	SHDMA_SLAVE_USBHS_RX, +	SHDMA_SLAVE_MMCIF_TX, +	SHDMA_SLAVE_MMCIF_RX, +}; + +extern void r8a7740_meram_workaround(void); +extern void r8a7740_init_irq_of(void); +extern void r8a7740_map_io(void); +extern void r8a7740_add_early_devices(void); +extern void r8a7740_add_standard_devices(void); +extern void r8a7740_add_standard_devices_dt(void); +extern void r8a7740_clock_init(u8 md_ck); +extern void r8a7740_pinmux_init(void); +extern void r8a7740_pm_init(void); + +#ifdef CONFIG_PM +extern void __init r8a7740_init_pm_domains(void); +#else +static inline void r8a7740_init_pm_domains(void) {} +#endif /* CONFIG_PM */ + +#endif /* __ASM_R8A7740_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h new file mode 100644 index 00000000000..f4076a50e97 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2013  Renesas Solutions Corp. + * Copyright (C) 2013  Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> + * Copyright (C) 2013  Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA + */ +#ifndef __ASM_R8A7778_H__ +#define __ASM_R8A7778_H__ + +#include <linux/sh_eth.h> + +/* HPB-DMA slave IDs */ +enum { +	HPBDMA_SLAVE_DUMMY, +	HPBDMA_SLAVE_SDHI0_TX, +	HPBDMA_SLAVE_SDHI0_RX, +	HPBDMA_SLAVE_SSI0_TX, +	HPBDMA_SLAVE_SSI0_RX, +	HPBDMA_SLAVE_SSI1_TX, +	HPBDMA_SLAVE_SSI1_RX, +	HPBDMA_SLAVE_SSI2_TX, +	HPBDMA_SLAVE_SSI2_RX, +	HPBDMA_SLAVE_SSI3_TX, +	HPBDMA_SLAVE_SSI3_RX, +	HPBDMA_SLAVE_SSI4_TX, +	HPBDMA_SLAVE_SSI4_RX, +	HPBDMA_SLAVE_SSI5_TX, +	HPBDMA_SLAVE_SSI5_RX, +	HPBDMA_SLAVE_SSI6_TX, +	HPBDMA_SLAVE_SSI6_RX, +	HPBDMA_SLAVE_SSI7_TX, +	HPBDMA_SLAVE_SSI7_RX, +	HPBDMA_SLAVE_SSI8_TX, +	HPBDMA_SLAVE_SSI8_RX, +	HPBDMA_SLAVE_HPBIF0_TX, +	HPBDMA_SLAVE_HPBIF0_RX, +	HPBDMA_SLAVE_HPBIF1_TX, +	HPBDMA_SLAVE_HPBIF1_RX, +	HPBDMA_SLAVE_HPBIF2_TX, +	HPBDMA_SLAVE_HPBIF2_RX, +	HPBDMA_SLAVE_HPBIF3_TX, +	HPBDMA_SLAVE_HPBIF3_RX, +	HPBDMA_SLAVE_HPBIF4_TX, +	HPBDMA_SLAVE_HPBIF4_RX, +	HPBDMA_SLAVE_HPBIF5_TX, +	HPBDMA_SLAVE_HPBIF5_RX, +	HPBDMA_SLAVE_HPBIF6_TX, +	HPBDMA_SLAVE_HPBIF6_RX, +	HPBDMA_SLAVE_HPBIF7_TX, +	HPBDMA_SLAVE_HPBIF7_RX, +	HPBDMA_SLAVE_HPBIF8_TX, +	HPBDMA_SLAVE_HPBIF8_RX, +	HPBDMA_SLAVE_USBFUNC_TX, +	HPBDMA_SLAVE_USBFUNC_RX, +}; + +extern void r8a7778_add_standard_devices(void); +extern void r8a7778_add_standard_devices_dt(void); +extern void r8a7778_add_dt_devices(void); + +extern void r8a7778_init_late(void); +extern void r8a7778_init_delay(void); +extern void r8a7778_init_irq_dt(void); +extern void r8a7778_clock_init(void); +extern void r8a7778_init_irq_extpin(int irlm); +extern void r8a7778_init_irq_extpin_dt(int irlm); +extern void r8a7778_pinmux_init(void); + +extern int r8a7778_usb_phy_power(bool enable); + +#endif /* __ASM_R8A7778_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h new file mode 100644 index 00000000000..88eeceaf108 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h @@ -0,0 +1,48 @@ +#ifndef __ASM_R8A7779_H__ +#define __ASM_R8A7779_H__ + +#include <linux/sh_clk.h> +#include <linux/pm_domain.h> +#include <mach/pm-rcar.h> + +/* HPB-DMA slave IDs */ +enum { +	HPBDMA_SLAVE_DUMMY, +	HPBDMA_SLAVE_SDHI0_TX, +	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); +extern void r8a7779_init_irq_dt(void); +extern void r8a7779_map_io(void); +extern void r8a7779_earlytimer_init(void); +extern void r8a7779_add_early_devices(void); +extern void r8a7779_add_standard_devices(void); +extern void r8a7779_add_standard_devices_dt(void); +extern void r8a7779_init_late(void); +extern void r8a7779_clock_init(void); +extern void r8a7779_pinmux_init(void); +extern void r8a7779_pm_init(void); +extern void r8a7779_register_twd(void); + +#ifdef CONFIG_PM +extern void __init r8a7779_init_pm_domains(void); +#else +static inline void r8a7779_init_pm_domains(void) {} +#endif /* CONFIG_PM */ + +extern struct smp_operations r8a7779_smp_ops; + +#endif /* __ASM_R8A7779_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h new file mode 100644 index 00000000000..0b95babe84b --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h @@ -0,0 +1,39 @@ +#ifndef __ASM_R8A7790_H__ +#define __ASM_R8A7790_H__ + +#include <mach/rcar-gen2.h> + +/* DMA slave IDs */ +enum { +	RCAR_DMA_SLAVE_INVALID, +	AUDIO_DMAC_SLAVE_SSI0_TX, +	AUDIO_DMAC_SLAVE_SSI0_RX, +	AUDIO_DMAC_SLAVE_SSI1_TX, +	AUDIO_DMAC_SLAVE_SSI1_RX, +	AUDIO_DMAC_SLAVE_SSI2_TX, +	AUDIO_DMAC_SLAVE_SSI2_RX, +	AUDIO_DMAC_SLAVE_SSI3_TX, +	AUDIO_DMAC_SLAVE_SSI3_RX, +	AUDIO_DMAC_SLAVE_SSI4_TX, +	AUDIO_DMAC_SLAVE_SSI4_RX, +	AUDIO_DMAC_SLAVE_SSI5_TX, +	AUDIO_DMAC_SLAVE_SSI5_RX, +	AUDIO_DMAC_SLAVE_SSI6_TX, +	AUDIO_DMAC_SLAVE_SSI6_RX, +	AUDIO_DMAC_SLAVE_SSI7_TX, +	AUDIO_DMAC_SLAVE_SSI7_RX, +	AUDIO_DMAC_SLAVE_SSI8_TX, +	AUDIO_DMAC_SLAVE_SSI8_RX, +	AUDIO_DMAC_SLAVE_SSI9_TX, +	AUDIO_DMAC_SLAVE_SSI9_RX, +}; + +void r8a7790_add_standard_devices(void); +void r8a7790_add_dt_devices(void); +void r8a7790_clock_init(void); +void r8a7790_pinmux_init(void); +void r8a7790_pm_init(void); +void r8a7790_init_early(void); +extern struct smp_operations r8a7790_smp_ops; + +#endif /* __ASM_R8A7790_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h new file mode 100644 index 00000000000..664274cc4b6 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/r8a7791.h @@ -0,0 +1,10 @@ +#ifndef __ASM_R8A7791_H__ +#define __ASM_R8A7791_H__ + +void r8a7791_add_standard_devices(void); +void r8a7791_add_dt_devices(void); +void r8a7791_clock_init(void); +void r8a7791_pinmux_init(void); +extern struct smp_operations r8a7791_smp_ops; + +#endif /* __ASM_R8A7791_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/rcar-gen2.h b/arch/arm/mach-shmobile/include/mach/rcar-gen2.h new file mode 100644 index 00000000000..43f606eb2d8 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/rcar-gen2.h @@ -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__ */ diff --git a/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h b/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h new file mode 100644 index 00000000000..4a81b01f1e8 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h @@ -0,0 +1,21 @@ +#ifndef SDHI_SH7372_H +#define SDHI_SH7372_H + +#define SDGENCNTA       0xfe40009c + +/* The countdown of SDGENCNTA is controlled by + * ZB3D2CLK which runs at 149.5MHz. + * That is 149.5ticks/us. Approximate this as 150ticks/us. + */ +static void udelay(int us) +{ +	__raw_writel(us * 150, SDGENCNTA); +	while(__raw_readl(SDGENCNTA)) ; +} + +static void msleep(int ms) +{ +	udelay(ms * 1000); +} + +#endif diff --git a/arch/arm/mach-shmobile/include/mach/sdhi.h b/arch/arm/mach-shmobile/include/mach/sdhi.h new file mode 100644 index 00000000000..0ec9e69f2c3 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/sdhi.h @@ -0,0 +1,16 @@ +#ifndef SDHI_H +#define SDHI_H + +/************************************************** + * + *		CPU specific settings + * + **************************************************/ + +#ifdef CONFIG_ARCH_SH7372 +#include "mach/sdhi-sh7372.h" +#else +#error "unsupported CPU." +#endif + +#endif /* SDHI_H */ diff --git a/arch/arm/mach-shmobile/include/mach/sh7367.h b/arch/arm/mach-shmobile/include/mach/sh7367.h deleted file mode 100644 index 52d0de686f6..00000000000 --- a/arch/arm/mach-shmobile/include/mach/sh7367.h +++ /dev/null @@ -1,332 +0,0 @@ -#ifndef __ASM_SH7367_H__ -#define __ASM_SH7367_H__ - -/* Pin Function Controller: - * GPIO_FN_xx - GPIO used to select pin function - * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU - */ -enum { -	/* 49-1 -> 49-6 (GPIO) */ -	GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4, -	GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9, - -	GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14, -	GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19, - -	GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24, -	GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29, - -	GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34, -	GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39, - -	GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44, -	GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49, - -	GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54, -	GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59, - -	GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64, -	GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69, - -	GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74, -	GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79, - -	GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84, -	GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89, - -	GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94, -	GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99, - -	GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104, -	GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109, - -	GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114, -	GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, GPIO_PORT119, - -	GPIO_PORT120, GPIO_PORT121, GPIO_PORT122, GPIO_PORT123, GPIO_PORT124, -	GPIO_PORT125, GPIO_PORT126, GPIO_PORT127, GPIO_PORT128, GPIO_PORT129, - -	GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134, -	GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139, - -	GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144, -	GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149, - -	GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154, -	GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159, - -	GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164, -	GPIO_PORT165, GPIO_PORT166, GPIO_PORT167, GPIO_PORT168, GPIO_PORT169, - -	GPIO_PORT170, GPIO_PORT171, GPIO_PORT172, GPIO_PORT173, GPIO_PORT174, -	GPIO_PORT175, GPIO_PORT176, GPIO_PORT177, GPIO_PORT178, GPIO_PORT179, - -	GPIO_PORT180, GPIO_PORT181, GPIO_PORT182, GPIO_PORT183, GPIO_PORT184, -	GPIO_PORT185, GPIO_PORT186, GPIO_PORT187, GPIO_PORT188, GPIO_PORT189, - -	GPIO_PORT190, GPIO_PORT191, GPIO_PORT192, GPIO_PORT193, GPIO_PORT194, -	GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199, - -	GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204, -	GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209, - -	GPIO_PORT210, GPIO_PORT211, GPIO_PORT212, GPIO_PORT213, GPIO_PORT214, -	GPIO_PORT215, GPIO_PORT216, GPIO_PORT217, GPIO_PORT218, GPIO_PORT219, - -	GPIO_PORT220, GPIO_PORT221, GPIO_PORT222, GPIO_PORT223, GPIO_PORT224, -	GPIO_PORT225, GPIO_PORT226, GPIO_PORT227, GPIO_PORT228, GPIO_PORT229, - -	GPIO_PORT230, GPIO_PORT231, GPIO_PORT232, GPIO_PORT233, GPIO_PORT234, -	GPIO_PORT235, GPIO_PORT236, GPIO_PORT237, GPIO_PORT238, GPIO_PORT239, - -	GPIO_PORT240, GPIO_PORT241, GPIO_PORT242, GPIO_PORT243, GPIO_PORT244, -	GPIO_PORT245, GPIO_PORT246, GPIO_PORT247, GPIO_PORT248, GPIO_PORT249, - -	GPIO_PORT250, GPIO_PORT251, GPIO_PORT252, GPIO_PORT253, GPIO_PORT254, -	GPIO_PORT255, GPIO_PORT256, GPIO_PORT257, GPIO_PORT258, GPIO_PORT259, - -	GPIO_PORT260, GPIO_PORT261, GPIO_PORT262, GPIO_PORT263, GPIO_PORT264, -	GPIO_PORT265, GPIO_PORT266, GPIO_PORT267, GPIO_PORT268, GPIO_PORT269, - -	GPIO_PORT270, GPIO_PORT271, GPIO_PORT272, - -	/* Special Pull-up / Pull-down Functions */ -	GPIO_FN_PORT48_KEYIN0_PU, GPIO_FN_PORT49_KEYIN1_PU, -	GPIO_FN_PORT50_KEYIN2_PU, GPIO_FN_PORT55_KEYIN3_PU, -	GPIO_FN_PORT56_KEYIN4_PU, GPIO_FN_PORT57_KEYIN5_PU, -	GPIO_FN_PORT58_KEYIN6_PU, - -	/* 49-1 (FN) */ -	GPIO_FN_VBUS0, GPIO_FN_CPORT0, GPIO_FN_CPORT1, GPIO_FN_CPORT2, -	GPIO_FN_CPORT3, GPIO_FN_CPORT4, GPIO_FN_CPORT5, GPIO_FN_CPORT6, -	GPIO_FN_CPORT7, GPIO_FN_CPORT8, GPIO_FN_CPORT9, GPIO_FN_CPORT10, -	GPIO_FN_CPORT11, GPIO_FN_SIN2, GPIO_FN_CPORT12, GPIO_FN_XCTS2, -	GPIO_FN_CPORT13, GPIO_FN_RFSPO4, GPIO_FN_CPORT14, GPIO_FN_RFSPO5, -	GPIO_FN_CPORT15, GPIO_FN_CPORT16, GPIO_FN_CPORT17, GPIO_FN_SOUT2, -	GPIO_FN_CPORT18, GPIO_FN_XRTS2, GPIO_FN_CPORT19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UT5, -	GPIO_FN_DV_DL1, GPIO_FN_MSIOF0_TXD, -	GPIO_FN_A20_EA20, GPIO_FN_PORT108_KEYIN0, -	GPIO_FN_DV_DL2, GPIO_FN_MSIOF0_RSCK, -	GPIO_FN_A21_EA21, GPIO_FN_PORT109_KEYIN1, -	GPIO_FN_DV_DL3, GPIO_FN_MSIOF0_RSYNC, -	GPIO_FN_A22_EA22, GPIO_FN_PORT110_KEYIN2, -	GPIO_FN_DV_DL4, GPIO_FN_MSIOF0_MCK0, -	GPIO_FN_A23_EA23, GPIO_FN_PORT111_KEYIN3, -	GPIO_FN_DV_DL5, GPIO_FN_MSIOF0_MCK1, -	GPIO_FN_A24_EA24, GPIO_FN_PORT112_KEYIN4, -	GPIO_FN_DV_DL6, GPIO_FN_MSIOF0_RXD, -	GPIO_FN_A25_EA25, GPIO_FN_PORT113_KEYIN5, -	GPIO_FN_DV_DL7, GPIO_FN_MSIOF0_SS2, -	GPIO_FN_A26, GPIO_FN_PORT113_KEYIN6, GPIO_FN_DV_CLKIL, -	GPIO_FN_D0_ED0_NAF0, GPIO_FN_D1_ED1_NAF1, GPIO_FN_D2_ED2_NAF2, -	GPIO_FN_D3_ED3_NAF3, GPIO_FN_D4_ED4_NAF4, GPIO_FN_D5_ED5_NAF5, -	GPIO_FN_D6_ED6_NAF6, GPIO_FN_D7_ED7_NAF7, GPIO_FN_D8_ED8_NAF8, -	GPIO_FN_D9_ED9_NAF9, GPIO_FN_D10_ED10_NAF10, GPIO_FN_D11_ED11_NAF11, -	GPIO_FN_D12_ED12_NAF12, GPIO_FN_D13_ED13_NAF13, -	GPIO_FN_D14_ED14_NAF14, GPIO_FN_D15_ED15_NAF15, -	GPIO_FN_CS4, GPIO_FN_CS5A, GPIO_FN_CS5B, GPIO_FN_FCE1, -	GPIO_FN_CS6B, GPIO_FN_XCS2, GPIO_FN_FCE0, GPIO_FN_CS6A, -	GPIO_FN_DACK0, GPIO_FN_WAIT, GPIO_FN_DREQ0, GPIO_FN_RD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O_FN_SIUAOBT, GPIO_FN_BBIF2_TSCK1, -	GPIO_FN_LCDD3, GPIO_FN_PORT178_KEYOUT3, GPIO_FN_DV_D3, -	GPIO_FN_SIUAOSLD, GPIO_FN_BBIF2_TXD1, -	GPIO_FN_LCDD4, GPIO_FN_PORT179_KEYOUT4, GPIO_FN_DV_D4, -	GPIO_FN_SIUAISPD, GPIO_FN_MFG1_OUT2, -	GPIO_FN_LCDD5, GPIO_FN_PORT180_KEYOUT5, GPIO_FN_DV_D5, -	GPIO_FN_SIUAILR, GPIO_FN_MFG2_OUT2, -	GPIO_FN_LCDD6, GPIO_FN_DV_D6, -	GPIO_FN_SIUAIBT, GPIO_FN_MFG3_OUT2, GPIO_FN_XWR2, -	GPIO_FN_LCDD7, GPIO_FN_DV_D7, -	GPIO_FN_SIUAISLD, GPIO_FN_MFG4_OUT2, GPIO_FN_XWR3, -	GPIO_FN_LCDD8, GPIO_FN_DV_D8, GPIO_FN_D16, GPIO_FN_ED16, -	GPIO_FN_LCDD9, GPIO_FN_DV_D9, GPIO_FN_D17, GPIO_FN_ED17, -	GPIO_FN_LCDD10, GPIO_FN_DV_D10, GPIO_FN_D18, GPIO_FN_ED18, -	GPIO_FN_LCDD11, GPIO_FN_DV_D11, GPIO_FN_D19, GPIO_FN_ED19, -	GPIO_FN_LCDD12, GPIO_FN_DV_D12, GPIO_FN_D20, GPIO_FN_ED20, -	GPIO_FN_LCDD13, GPIO_FN_DV_D13, GPIO_FN_D21, GPIO_FN_ED21, -	GPIO_FN_LCDD14, GPIO_FN_DV_D14, GPIO_FN_D22, GPIO_FN_ED22, -	GPIO_FN_LCDD15, GPIO_FN_DV_D15, GPIO_FN_D23, GPIO_FN_ED23, -	GPIO_FN_LCDD16, GPIO_FN_DV_HSYNC, GPIO_FN_D24, GPIO_FN_ED24, -	GPIO_FN_LCDD17, GPIO_FN_DV_VSYNC, GPIO_FN_D25, GPIO_FN_ED25, -	GPIO_FN_LCDD18, GPIO_FN_DREQ2, GPIO_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FN_XRTS3, GPIO_FN_SCIFA2_RTS1, GPIO_FN_PORT248_MSIOF2_SS2, -	GPIO_FN_XCTS3, GPIO_FN_SCIFA2_CTS1, GPIO_FN_PORT249_MSIOF2_RXD, -	GPIO_FN_DINT, GPIO_FN_SCIFA2_SCK1, GPIO_FN_TS_SCK3, -	GPIO_FN_SDHICLK0, GPIO_FN_TCK2, -	GPIO_FN_SDHICD0, -	GPIO_FN_SDHID0_0, GPIO_FN_TMS2, -	GPIO_FN_SDHID0_1, GPIO_FN_TDO2, -	GPIO_FN_SDHID0_2, GPIO_FN_TDI2, -	GPIO_FN_SDHID0_3, GPIO_FN_RTCK2, - -	/* 49-6 (FN) */ -	GPIO_FN_SDHICMD0, GPIO_FN_TRST2, -	GPIO_FN_SDHIWP0, GPIO_FN_EDBGREQ2, -	GPIO_FN_SDHICLK1, GPIO_FN_TCK3, -	GPIO_FN_SDHID1_0, GPIO_FN_M11_SLCD_SO2, -	GPIO_FN_TS_SPSYNC2, GPIO_FN_TMS3, -	GPIO_FN_SDHID1_1, GPIO_FN_M9_SLCD_AO2, -	GPIO_FN_TS_SDAT2, GPIO_FN_TDO3, -	GPIO_FN_SDHID1_2, GPIO_FN_M10_SLCD_CK2, -	GPIO_FN_TS_SDEN2, GPIO_FN_TDI3, -	GPIO_FN_SDHID1_3, GPIO_FN_M12_SLCD_CE2, -	GPIO_FN_TS_SCK2, GPIO_FN_RTCK3, -	GPIO_FN_SDHICMD1, GPIO_FN_TRST3, -	GPIO_FN_SDHICLK2, GPIO_FN_SCIFB_SCK, -	GPIO_FN_SDHID2_0, GPIO_FN_SCIFB_TXD, -	GPIO_FN_SDHID2_1, GPIO_FN_SCIFB_CTS, -	GPIO_FN_SDHID2_2, GPIO_FN_SCIFB_RXD, -	GPIO_FN_SDHID2_3, GPIO_FN_SCIFB_RTS, -	GPIO_FN_SDHICMD2, -	GPIO_FN_RESETOUTS, -	GPIO_FN_DIVLOCK, -}; - -#endif /* __ASM_SH7367_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index e4f9004e710..854a9f0ca04 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h @@ -12,429 +12,12 @@  #define __ASM_SH7372_H__  #include <linux/sh_clk.h> - -/* - * Pin Function Controller: - *	GPIO_FN_xx - GPIO used to select pin function - *	GPIO_PORTxx - GPIO mapped to real I/O pin on CPU - */ -enum { -	/* PORT */ -	GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4, -	GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9, - -	GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14, -	GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19, - -	GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24, -	GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29, - -	GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34, -	GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39, - -	GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44, -	GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49, - -	GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54, -	GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59, - -	GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64, -	GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69, - -	GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74, -	GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79, - -	GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84, -	GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89, - -	GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94, -	GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99, - -	GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104, -	GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109, - -	GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114, -	GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, GPIO_PORT119, - -	GPIO_PORT120, GPIO_PORT121, GPIO_PORT122, GPIO_PORT123, GPIO_PORT124, -	GPIO_PORT125, GPIO_PORT126, GPIO_PORT127, GPIO_PORT128, GPIO_PORT129, - -	GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134, -	GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139, - -	GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144, -	GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149, - -	GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154, -	GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159, - -	GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164, -	GPIO_PORT165, GPIO_PORT166, GPIO_PORT167, GPIO_PORT168, GPIO_PORT169, - -	GPIO_PORT170, GPIO_PORT171, GPIO_PORT172, GPIO_PORT173, GPIO_PORT174, -	GPIO_PORT175, GPIO_PORT176, GPIO_PORT177, GPIO_PORT178, GPIO_PORT179, - -	GPIO_PORT180, GPIO_PORT181, GPIO_PORT182, GPIO_PORT183, GPIO_PORT184, -	GPIO_PORT185, GPIO_PORT186, GPIO_PORT187, GPIO_PORT188, GPIO_PORT189, - -	GPIO_PORT190, - -	/* IRQ */ -	GPIO_FN_IRQ0_6,		/* PORT   6 */ -	GPIO_FN_IRQ0_162,	/* PORT 162 */ -	GPIO_FN_IRQ1,		/* PORT  12 */ -	GPIO_FN_IRQ2_4,		/* PORT   4 */ -	GPIO_FN_IRQ2_5,		/* PORT   5 */ -	GPIO_FN_IRQ3_8,		/* PORT   8 */ -	GPIO_FN_IRQ3_16,	/* PORT  16 */ -	GPIO_FN_IRQ4_17,	/* PORT  17 */ -	GPIO_FN_IRQ4_163,	/* PORT 163 */ -	GPIO_FN_IRQ5,		/* PORT  18 */ -	GPIO_FN_IRQ6_39,	/* PORT  39 */ -	GPIO_FN_IRQ6_164,	/* PORT 164 */ -	GPIO_FN_IRQ7_40,	/* PORT  40 */ -	GPIO_FN_IRQ7_167,	/* PORT 167 */ -	GPIO_FN_IRQ8_41,	/* PORT  41 */ -	GPIO_FN_IRQ8_168,	/* PORT 168 */ -	GPIO_FN_IRQ9_42,	/* PORT  42 */ -	GPIO_FN_IRQ9_169,	/* PORT 169 */ -	GPIO_FN_IRQ10,		/* PORT  65 */ -	GPIO_FN_IRQ11,		/* PORT  67 */ -	GPIO_FN_IRQ12_80,	/* PORT  80 */ -	GPIO_FN_IRQ12_137,	/* PORT 137 */ -	GPIO_FN_IRQ13_81,	/* PORT  81 */ -	GPIO_FN_IRQ13_145,	/* PORT 145 */ -	GPIO_FN_IRQ14_82,	/* PORT  82 */ -	GPIO_FN_IRQ14_146,	/* PORT 146 */ -	GPIO_FN_IRQ15_83,	/* PORT  83 */ -	GPIO_FN_IRQ15_147,	/* PORT 147 */ -	GPIO_FN_IRQ16_84,	/* PORT  84 */ -	GPIO_FN_IRQ16_170,	/* PORT 170 */ -	GPIO_FN_IRQ17,		/* PORT  85 */ -	GPIO_FN_IRQ18,		/* PORT  86 */ -	GPIO_FN_IRQ19,		/* PORT  87 */ -	GPIO_FN_IRQ20,		/* PORT  92 */ -	GPIO_FN_IRQ21,		/* PORT  93 */ -	GPIO_FN_IRQ22,		/* PORT  94 */ -	GPIO_FN_IRQ23,		/* PORT  95 */ -	GPIO_FN_IRQ24,		/* PORT 112 */ -	GPIO_FN_IRQ25,		/* PORT 119 */ -	GPIO_FN_IRQ26_121,	/* PORT 121 */ -	GPIO_FN_IRQ26_172,	/* PORT 172 */ -	GPIO_FN_IRQ27_122,	/* PORT 122 */ -	GPIO_FN_IRQ27_180,	/* PORT 180 */ -	GPIO_FN_IRQ28_123,	/* PORT 123 */ -	GPIO_FN_IRQ28_181,	/* PORT 181 */ -	GPIO_FN_IRQ29_129,	/* PORT 129 */ -	GPIO_FN_IRQ29_182,	/* PORT 182 */ -	GPIO_FN_IRQ30_130,	/* PORT 130 */ -	GPIO_FN_IRQ30_183,	/* PORT 183 */ -	GPIO_FN_IRQ31_138,	/* PORT 138 */ -	GPIO_FN_IRQ31_184,	/* PORT 184 */ - -	/* -	 * MSIOF0	(PORT 36, 37, 38, 39 -	 * 		      40, 41, 42, 43, 44, 45) -	 */ -	GPIO_FN_MSIOF0_TSYNC,	GPIO_FN_MSIOF0_TSCK, -	GPIO_FN_MSIOF0_RXD,	GPIO_FN_MSIOF0_RSCK, -	GPIO_FN_MSIOF0_RSYNC,	GPIO_FN_MSIOF0_MCK0, -	GPIO_FN_MSIOF0_MCK1,	GPIO_FN_MSIOF0_SS1, -	GPIO_FN_MSIOF0_SS2,	GPIO_FN_MSIOF0_TXD, - -	/* -	 * MSIOF1	(PORT 39, 40, 41, 42, 43, 44 -	 * 		      84, 85, 86, 87, 88, 89, 90, 91, 92, 93) -	 */ -	GPI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CK, -	GPIO_FN_FSIAILR,	GPIO_FN_FSIAIBT, -	GPIO_FN_FSIAISLD,	GPIO_FN_FSIAOMC, -	GPIO_FN_FSIAOLR,	GPIO_FN_FSIAOBT, -	GPIO_FN_FSIAOSLD,	GPIO_FN_FSIASPDIF_11, -	GPIO_FN_FSIASPDIF_15, - -	/* FMSI		(PORT 12, 13, 14, 15, 16, 17, 18, 65) */ -	GPIO_FN_FMSOCK,		GPIO_FN_FMSOOLR, -	GPIO_FN_FMSIOLR,	GPIO_FN_FMSOOBT, -	GPIO_FN_FMSIOBT,	GPIO_FN_FMSOSLD, -	GPIO_FN_FMSOILR,	GPIO_FN_FMSIILR, -	GPIO_FN_FMSOIBT,	GPIO_FN_FMSIIBT, -	GPIO_FN_FMSISLD,	GPIO_FN_FMSICK, - -	/* SCIFA0	(PORT 152, 153, 156, 157, 158) */ -	GPIO_FN_SCIFA0_TXD,	GPIO_FN_SCIFA0_RXD, -	GPIO_FN_SCIFA0_SCK,	GPIO_FN_SCIFA0_RTS, -	GPIO_FN_SCIFA0_CTS, - -	/* SCIFA1	(PORT 154, 155, 159, 160, 161) */ -	GPIO_FN_SCIFA1_TXD,	GPIO_FN_SCIFA1_RXD, -	GPIO_FN_SCIFA1_SCK,	GPIO_FN_SCIFA1_RTS, -	GPIO_FN_SCIFA1_CTS, - -	/* SCIFA2	(PORT 94, 95, 96, 97, 98) */ -	GPIO_FN_SCIFA2_CTS1,	GPIO_FN_SCIFA2_RTS1, -	GPIO_FN_SCIFA2_TXD1,	GPIO_FN_SCIFA2_RXD1, -	GPIO_FN_SCIFA2_SCK1, - -	/* SCIFA3	(PORT 43, 44, -			     140, 141, 142, 143, 144) */ -	GPIO_FN_SCIFA3_CTS_43,	GPIO_FN_SCIFA3_CTS_140, -	GPIO_FN_SCIFA3_RTS_44,	GPIO_FN_SCIFA3_RTS_141, -	GPIO_FN_SCIFA3_SCK,	GPIO_FN_SCIFA3_TXD, -	GPIO_FN_SCIFA3_RXD, - -	/* SCIFA4	(PORT 5, 6) */ -	GPIO_FN_SCIFA4_RXD,	GPIO_FN_SCIFA4_TXD, - -	/* SCIFA5	(PORT 8, 12) */ -	GPIO_FN_SCIFA5_RXD,	GPIO_FN_SCIFA5_TXD, - -	/* SCIFB	(PORT 162, 163, 164, 165, 166) */ -	GPIO_FN_SCIFB_SCK,	GPIO_FN_SCIFB_RTS, -	GPIO_FN_SCIFB_CTS,	GPIO_FN_SCIFB_TXD, -	GPIO_FN_SCIFB_RXD, - -	/* -	 * CEU		(PORT 16, 17, -	 *		      100, 101, 102, 103, 104, 105, 106, 107, 108, 109, -	 *		      110, 111, 112, 113, 114, 115, 116, 117, 118, 119, -	 *		      120) -	 */ -	GPIO_FN_VIO_HD,		GPIO_FN_VIO_CKO1,	GPIO_FN_VIO_CKO2, -	GPIO_FN_VIO_VD,		GPIO_FN_VIO_CLK,	GPIO_FN_VIO_FIELD, -	GPIO_FN_VIO_CKO, -	GPIO_FN_VIO_D0,		GPIO_FN_VIO_D1,		GPIO_FN_VIO_D2, -	GPIO_FN_VIO_D3,		GPIO_FN_VIO_D4,		GPIO_FN_VIO_D5, -	GPIO_FN_VIO_D6,		GPIO_FN_VIO_D7,		GPIO_FN_VIO_D8, -	GPIO_FN_VIO_D9,		GPIO_FN_VIO_D10,	GPIO_FN_VIO_D11, -	GPIO_FN_VIO_D12,	GPIO_FN_VIO_D13,	GPIO_FN_VIO_D14, -	GPIO_FN_VIO_D15, - -	/* USB0		(PORT 113, 114, 115, 116, 117, 167) */ -	GPIO_FN_IDIN_0,		GPIO_FN_EXTLP_0, -	GPIO_FN_OVCN2_0,	GPIO_FN_PWEN_0, -	GPIO_FN_OVCN_0,		GPIO_FN_VBUS0_0, - -	/* USB1		(PORT 18, 113, 114, 115, 116, 117, 138, 162, 168) */ -	GPIO_FN_IDIN_1_18,	GPIO_FN_IDIN_1_113, -	GPIO_FN_PWEN_1_115,	GPIO_FN_PWEN_1_138, -	GPIO_FN_OVCN_1_114,	GPIO_FN_OVCN_1_162, -	GPIO_FN_EXTLP_1,	GPIO_FN_OVCN2_1, -	GPIO_FN_VBUS0_1, - -	/* GPIO		(PORT 41, 42, 43, 44) */ -	GPIO_FN_GPI0,	GPIO_FN_GPI1,	GPIO_FN_GPO0,	GPIO_FN_GPO1, - -	/* -	 * BSC		(PORT 19, -	 *		      20, 21, 22, 25, 26, 27, 28, 29, -	 *		      30, 31, 32, 33, 34, 35, 36, 37, 38, 39, -	 *		      40, 41, 42, 43, 44, 45, -	 *		      62, 63, 64, 65, 66, 67, -	 *		      71, 72, 74, 75) -	 */ -	GPIO_FN_BS,	GPIO_FN_WE1, -	GPIO_FN_CKO,	GPIO_FN_WAIT,	GPIO_FN_RDWR, - -	GPIO_FN_A0,	GPIO_FN_A1,	GPIO_FN_A2,	GPIO_FN_A3, -	GPIO_FN_A6,	GPIO_FN_A7,	GPIO_FN_A8,	GPIO_FN_A9, -	GPIO_FN_A10,	GPIO_FN_A11,	GPIO_FN_A12,	GPIO_FN_A13, -	GPIO_FN_A14,	GPIO_FN_A15,	GPIO_FN_A16,	GPIO_FN_A17, -	GPIO_FN_A18,	GPIO_FN_A19,	GPIO_FN_A20,	GPIO_FN_A21, -	GPIO_FN_A22,	GPIO_FN_A23,	GPIO_FN_A24,	GPIO_FN_A25, -	GPIO_FN_A26, - -	GPIO_FN_CS0,	GPIO_FN_CS2,	GPIO_FN_CS4, -	GPIO_FN_CS5A,	GPIO_FN_CS5B,	GPIO_FN_CS6A, - -	/* -	 * BSC/FLCTL		(PORT 23, 24, -	 *			      46, 47, 48, 49, -	 *			      50, 51, 52, 53, 54, 55, 56, 57, 58, 59, -	 *			      60, 61, 69, 70) -	 */ -	GPIO_FN_RD_FSC,		GPIO_FN_WE0_FWE, -	GPIO_FN_A4_FOE,		GPIO_FN_A5_FCDE, -	GPIO_FN_D0_NAF0,	GPIO_FN_D1_NAF1,	GPIO_FN_D2_NAF2, -	GPIO_FN_D3_NAF3,	GPIO_FN_D4_NAF4,	GPIO_FN_D5_NAF5, -	GPIO_FN_D6_NAF6,	GPIO_FN_D7_NAF7,	GPIO_FN_D8_NAF8, -	GPIO_FN_D9_NAF9,	GPIO_FN_D10_NAF10,	GPIO_FN_D11_NAF11, -	GPIO_FN_D12_NAF12,	GPIO_FN_D13_NAF13,	GPIO_FN_D14_NAF14, -	GPIO_FN_D15_NAF15, - -	/* -	 * MMCIF(1)		(PORT 84, 85, 86, 87, 88, 89, -	 *			      90, 91, 92, 99) -	 */ -	GPIO_FN_MMCD0_0,	GPIO_FN_MMCD0_1,	GPIO_FN_MMCD0_2, -	GPIO_FN_MMCD0_3,	GPIO_FN_MMCD0_4,	GPIO_FN_MMCD0_5, -	GPIO_FN_MMCD0_6,	GPIO_FN_MMCD0_7, -	GPIO_FN_MMCCMD0,	GPIO_FN_MMCCLK0, - -	/* MMCIF(2)		(PORT 54, 55, 56, 57, 58, 59, 60, 61, 66, 67) */ -	GPIO_FN_MMCD1_0,	GPIO_FN_MMCD1_1,	GPIO_FN_MMCD1_2, -	GPIO_FN_MMCD1_3,	GPIO_FN_MMCD1_4,	GPIO_FN_MMCD1_5, -	GPIO_FN_MMCD1_6,	GPIO_FN_MMCD1_7, -	GPIO_FN_MMCCLK1,	GPIO_FN_MMCCMD1, - -	/* SPU2		(PORT 65) */ -	GPIO_FN_VINT_I, - -	/* FLCTL	(PORT 66, 68, 73) */ -	GPIO_FN_FCE1,	GPIO_FN_FCE0,	GPIO_FN_FRB, - -	/* HSI		(PORT 76, 77, 78, 79, 80, 81, 82, 83) */ -	GPIO_FN_GP_RX_FLAG,	GPIO_FN_GP_RX_DATA,	GPIO_FN_GP_TX_READY, -	GPIO_FN_GP_RX_WAKE,	GPIO_FN_MP_TX_FLAG,	GPIO_FN_MP_TX_DATA, -	GPIO_FN_MP_RX_READY,	GPIO_FN_MP_TX_WAKE, - -	/* -	 * MFI		(PORT 76, 77, 78, 79, -	 *		      80, 81, 82, 83, 84, 85, 86, 87, 88, 89, -	 *		      90, 91, 92, 93, 94, 95, 96, 97, 98, 99) -	 */ -	GPIO_FN_MFIv6,	/* see MSEL4CR 6 */ -	GPIO_FN_MFIv4,	/* see MSEL4CR 6 */ - -	GPIO_FN_MEMC_CS0,		GPIO_FN_MEMC_BUSCLK_MEMC_A0, -	GPIO_FN_MEMC_CS1_MEMC_A1,	GPIO_FN_MEMC_ADV_MEMC_DREQ0, -	GPIO_FN_MEMC_WAIT_MEMC_DREQ1,	GPIO_FN_MEMC_NOE, -	GPIO_FN_MEMC_NWE,		GPIO_FN_MEMC_INT, - -	GPIO_FN_MEMC_AD0,	GPIO_FN_MEMC_AD1,	GPIO_FN_MEMC_AD2, -	GPIO_FN_MEMC_AD3,	GPIO_FN_MEMC_AD4,	GPIO_FN_MEMC_AD5, -	GPIO_FN_MEMC_AD6,	GPIO_FN_MEMC_AD7,	GPIO_FN_MEMC_AD8, -	GPIO_FN_MEMC_AD9,	GPIO_FN_MEMC_AD10,	GPIO_FN_MEMC_AD11, -	GPIO_FN_MEMC_AD12,	GPIO_FN_MEMC_AD13,	GPIO_FN_MEMC_AD14, -	GPIO_FN_MEMC_AD15, - -	/* SIM		(PORT 94, 95, 98) */ -	GPIO_FN_SIM_RST,	GPIO_FN_SIM_CLK,	GPIO_FN_SIM_D, - -	/* TPU		(PORT 93, 99, 112, 160, 161) */ -	GPIO_FN_TPU0TO0,	GPIO_FN_TPU0TO1, -	GPIO_FN_TPU0TO2_93,	GPIO_FN_TPU0TO2_99, -	GPIO_FN_TPU0TO3, - -	/* I2C2		(PORT 110, 111) */ -	GPIO_FN_I2C_SCL2,	GPIO_FN_I2C_SDA2, - -	/* I2C3(1)	(PORT 114, 115) */ -	GPIO_FN_I2C_SCL3,	GPIO_FN_I2C_SDA3, - -	/* I2C3(2)	(PORT 137, 145) */ -	GPIO_FN_I2C_SCL3S,	GPIO_FN_I2C_SDA3S, - -	/* I2C4(2)	(PORT 116, 117) */ -	GPIO_FN_I2C_SCL4,	GPIO_FN_I2C_SDA4, - -	/* I2C4(2)	(PORT 146, 147) */ -	GPIO_FN_I2C_SCL4S,	GPIO_FN_I2C_SDA4S, - -	/* -	 * KEYSC	(PORT 121, 122, 123, 124, 125, 126, 127, 128, 129, -	 *		      130, 131, 132, 133, 134, 135, 136) -	 */ -	GPIO_FN_KEYOUT0,	GPIO_FN_KEYIN0_121,	GPIO_FN_KEYIN0_136, -	GPIO_FN_KEYOUT1,	GPIO_FN_KEYIN1_122,	GPIO_FN_KEYIN1_135, -	GPIO_FN_KEYOUT2,	GPIO_FN_KEYIN2_123,	GPIO_FN_KEYIN2_134, -	GPIO_FN_KEYOUT3,	GPIO_FN_KEYIN3_124,	GPIO_FN_KEYIN3_133, -	GPIO_FN_KEYOUT4,	GPIO_FN_KEYIN4, -	GPIO_FN_KEYOUT5,	GPIO_FN_KEYIN5, -	GPIO_FN_KEYOUT6,	GPIO_FN_KEYIN6, -	GPIO_FN_KEYOUT7,	GPIO_FN_KEYIN7, - -	/* -	 * LCDC		(PORT      121, 122, 123, 124, 125, 126, 127, 128, 129, -	 *		      130, 131, 132, 133, 134, 135, 136, 137, 138, 139, -	 *		      140, 141, 142, 143, 144, 145, 146, 147, 148, 149, -	 *		      150, 151) -	 */ -	GPIO_FN_LCDC0_SELECT, /* LCDC 0 */ -	GPIO_FN_LCDC1_SELECT, /* LCDC 1 */ -	GPIO_FN_LCDHSYN,	GPIO_FN_LCDCS,	GPIO_FN_LCDVSYN, -	GPIO_FN_LCDDCK,		GPIO_FN_LCDWR,	GPIO_FN_LCDRD, -	GPIO_FN_LCDDISP,	GPIO_FN_LCDRS,	GPIO_FN_LCDLCLK, -	GPIO_FN_LCDDON, - -	GPIO_FN_LCDD0,	GPIO_FN_LCDD1,	GPIO_FN_LCDD2,	GPIO_FN_LCDD3, -	GPIO_FN_LCDD4,	GPIO_FN_LCDD5,	GPIO_FN_LCDD6,	GPIO_FN_LCDD7, -	GPIO_FN_LCDD8,	GPIO_FN_LCDD9,	GPIO_FN_LCDD10,	GPIO_FN_LCDD11, -	GPIO_FN_LCDD12,	GPIO_FN_LCDD13,	GPIO_FN_LCDD14,	GPIO_FN_LCDD15, -	GPIO_FN_LCDD16,	GPIO_FN_LCDD17,	GPIO_FN_LCDD18,	GPIO_FN_LCDD19, -	GPIO_FN_LCDD20,	GPIO_FN_LCDD21,	GPIO_FN_LCDD22,	GPIO_FN_LCDD23, - -	/* IRDA		(PORT 139, 140, 141, 142) */ -	GPIO_FN_IRDA_OUT,	GPIO_FN_IRDA_IN,	GPIO_FN_IRDA_FIRSEL, -	GPIO_FN_IROUT_139,	GPIO_FN_IROUT_140, - -	/* TSIF1	(PORT 156, 157, 158, 159) */ -	GPIO_FN_TS0_1SELECT, /* TSIF0 - 1 select */ -	GPIO_FN_TS0_2SELECT, /* TSIF0 - 2 select */ -	GPIO_FN_TS1_1SELECT, /* TSIF1 - 1 select */ -	GPIO_FN_TS1_2SELECT, /* TSIF1 - 2 select */ - -	GPIO_FN_TS_SPSYNC1,	GPIO_FN_TS_SDAT1, -	GPIO_FN_TS_SDEN1,	GPIO_FN_TS_SCK1, - -	/* TSIF2	(PORT 137, 145, 146, 147) */ -	GPIO_FN_TS_SPSYNC2,	GPIO_FN_TS_SDAT2, -	GPIO_FN_TS_SDEN2,	GPIO_FN_TS_SCK2, - -	/* HDMI		(PORT 169, 170) */ -	GPIO_FN_HDMI_HPD,	GPIO_FN_HDMI_CEC, - -	/* SDHI0	(PORT 171, 172, 173, 174, 175, 176, 177, 178) */ -	GPIO_FN_SDHICLK0,	GPIO_FN_SDHICD0, -	GPIO_FN_SDHICMD0,	GPIO_FN_SDHIWP0, -	GPIO_FN_SDHID0_0,	GPIO_FN_SDHID0_1, -	GPIO_FN_SDHID0_2,	GPIO_FN_SDHID0_3, - -	/* SDHI1	(PORT 179, 180, 181, 182, 183, 184) */ -	GPIO_FN_SDHICLK1,	GPIO_FN_SDHICMD1,	GPIO_FN_SDHID1_0, -	GPIO_FN_SDHID1_1,	GPIO_FN_SDHID1_2,	GPIO_FN_SDHID1_3, - -	/* SDHI2	(PORT 185, 186, 187, 188, 189, 190) */ -	GPIO_FN_SDHICLK2,	GPIO_FN_SDHICMD2,	GPIO_FN_SDHID2_0, -	GPIO_FN_SDHID2_1,	GPIO_FN_SDHID2_2,	GPIO_FN_SDHID2_3, - -	/* SDENC	see MSEL4CR 19 */ -	GPIO_FN_SDENC_CPG, -	GPIO_FN_SDENC_DV_CLKI, -}; +#include <linux/pm_domain.h> +#include <mach/pm-rmobile.h>  /* DMA slave IDs */  enum { +	SHDMA_SLAVE_INVALID,  	SHDMA_SLAVE_SCIF0_TX,  	SHDMA_SLAVE_SCIF0_RX,  	SHDMA_SLAVE_SCIF1_TX, @@ -449,12 +32,24 @@ enum {  	SHDMA_SLAVE_SCIF5_RX,  	SHDMA_SLAVE_SCIF6_TX,  	SHDMA_SLAVE_SCIF6_RX, +	SHDMA_SLAVE_FLCTL0_TX, +	SHDMA_SLAVE_FLCTL0_RX, +	SHDMA_SLAVE_FLCTL1_TX, +	SHDMA_SLAVE_FLCTL1_RX,  	SHDMA_SLAVE_SDHI0_RX,  	SHDMA_SLAVE_SDHI0_TX,  	SHDMA_SLAVE_SDHI1_RX,  	SHDMA_SLAVE_SDHI1_TX,  	SHDMA_SLAVE_SDHI2_RX,  	SHDMA_SLAVE_SDHI2_TX, +	SHDMA_SLAVE_FSIA_RX, +	SHDMA_SLAVE_FSIA_TX, +	SHDMA_SLAVE_MMCIF_RX, +	SHDMA_SLAVE_MMCIF_TX, +	SHDMA_SLAVE_USB0_TX, +	SHDMA_SLAVE_USB0_RX, +	SHDMA_SLAVE_USB1_TX, +	SHDMA_SLAVE_USB1_RX,  };  extern struct clk sh7372_extal1_clk; @@ -462,9 +57,32 @@ extern struct clk sh7372_extal2_clk;  extern struct clk sh7372_dv_clki_clk;  extern struct clk sh7372_dv_clki_div2_clk;  extern struct clk sh7372_pllc2_clk; -extern struct clk sh7372_fsiack_clk; -extern struct clk sh7372_fsibck_clk; -extern struct clk sh7372_fsidiva_clk; -extern struct clk sh7372_fsidivb_clk; + +extern void sh7372_init_irq(void); +extern void sh7372_map_io(void); +extern void sh7372_earlytimer_init(void); +extern void sh7372_add_early_devices(void); +extern void sh7372_add_standard_devices(void); +extern void sh7372_add_early_devices_dt(void); +extern void sh7372_add_standard_devices_dt(void); +extern void sh7372_clock_init(void); +extern void sh7372_pinmux_init(void); +extern void sh7372_pm_init(void); +extern void sh7372_resume_core_standby_sysc(void); +extern int  sh7372_do_idle_sysc(unsigned long sleep_mode); +extern void sh7372_intcs_suspend(void); +extern void sh7372_intcs_resume(void); +extern void sh7372_intca_suspend(void); +extern void sh7372_intca_resume(void); + +extern unsigned long sh7372_cpu_resume; + +#ifdef CONFIG_PM +extern void __init sh7372_init_pm_domains(void); +#else +static inline void sh7372_init_pm_domains(void) {} +#endif + +extern void __init sh7372_pm_init_late(void);  #endif /* __ASM_SH7372_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/sh7377.h b/arch/arm/mach-shmobile/include/mach/sh7377.h deleted file mode 100644 index f580e227dd1..00000000000 --- a/arch/arm/mach-shmobile/include/mach/sh7377.h +++ /dev/null @@ -1,360 +0,0 @@ -#ifndef __ASM_SH7377_H__ -#define __ASM_SH7377_H__ - -/* Pin Function Controller: - * GPIO_FN_xx - GPIO used to select pin function - * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU - */ -enum { -	/* 55-1 -> 55-5 (GPIO) */ -	GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4, -	GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9, - -	GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14, -	GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19, - -	GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24, -	GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29, - -	GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34, -	GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39, - -	GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44, -	GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49, - -	GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54, -	GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59, - -	GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64, -	GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69, - -	GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74, -	GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79, - -	GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84, -	GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89, - -	GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94, -	GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99, - -	GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104, -	GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109, - -	GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114, -	GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, - -	GPIO_PORT128, GPIO_PORT129, - -	GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134, -	GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139, - -	GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144, -	GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149, - -	GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154, -	GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159, - -	GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164, - -	GPIO_PORT192, GPIO_PORT193, GPIO_PORT194, -	GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199, - -	GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204, -	GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209, - -	GPIO_PORT210, GPIO_PORT211, GPIO_PORT212, GPIO_PORT213, GPIO_PORT214, -	GPIO_PORT215, GPIO_PORT216, GPIO_PORT217, GPIO_PORT218, GPIO_PORT219, - -	GPIO_PORT220, GPIO_PORT221, GPIO_PORT222, GPIO_PORT223, GPIO_PORT224, -	GPIO_PORT225, GPIO_PORT226, GPIO_PORT227, GPIO_PORT228, GPIO_PORT229, - -	GPIO_PORT230, GPIO_PORT231, GPIO_PORT232, GPIO_PORT233, GPIO_PORT234, -	GPIO_PORT235, GPIO_PORT236, GPIO_PORT237, GPIO_PORT238, GPIO_PORT239, - -	GPIO_PORT240, GPIO_PORT241, GPIO_PORT242, GPIO_PORT243, GPIO_PORT244, -	GPIO_PORT245, GPIO_PORT246, GPIO_PORT247, GPIO_PORT248, GPIO_PORT249, - -	GPIO_PORT250, GPIO_PORT251, GPIO_PORT252, GPIO_PORT253, GPIO_PORT254, -	GPIO_PORT255, GPIO_PORT256, GPIO_PORT257, GPIO_PORT258, GPIO_PORT259, - -	GPIO_PORT260, GPIO_PORT261, GPIO_PORT262, GPIO_PORT263, GPIO_PORT264, - -	/* Special Pull-up / Pull-down Functions */ -	GPIO_FN_PORT66_KEYIN0_PU, GPIO_FN_PORT67_KEYIN1_PU, -	GPIO_FN_PORT68_KEYIN2_PU, GPIO_FN_PORT69_KEYIN3_PU, -	GPIO_FN_PORT70_KEYIN4_PU, GPIO_FN_PORT71_KEYIN5_PU, -	GPIO_FN_PORT72_KEYIN6_PU, - -	/* 55-1 (FN) */ -	GPIO_FN_VBUS_0, -	GPIO_FN_CPORT0, -	GPIO_FN_CPORT1, -	GPIO_FN_CPORT2, -	GPIO_FN_CPORT3, -	GPIO_FN_CPORT4, -	GPIO_FN_CPORT5, -	GPIO_FN_CPORT6, -	GPIO_FN_CPORT7, -	GPIO_FN_CPORT8, -	GPIO_FN_CPORT9, -	GPIO_FN_CPORT10, -	GPIO_FN_CPORT11, GPIO_FN_SIN2, -	GPIO_FN_CPORT12, GPIO_FN_XCTS2, -	GPIO_FN_CPORT13, GPIO_FN_RFSPO4, -	GPIO_FN_CPORT14, GPIO_FN_RFSPO5, -	GPIO_FN_CPORT15, GPIO_FN_SCIFA0_SCK, GPIO_FN_GPS_AGC2, -	GPIO_FN_CPORT16, GPIO_FN_SCIFA0_TXD, GPIO_FN_GPS_AGC3, -	GPIO_FN_CPORT17_IC_OE, GPIO_FN_SOUT2, -	GPIO_FN_CPORT18, GPIO_FN_XRTS2, GPIO_FN_PORT19_VIO_CKO2, -	GPIO_FN_CPORT19_MPORT1, -	GPIO_FN_CPORT20, GPIO_FN_RFSPO6, -	GPIO_FN_CPORT21, GPIO_FN_STATUS0, -	GPIO_FN_CPORT22, GPIO_FN_STATUS1, -	GPIO_FN_CPORT23, GPIO_FN_STATUS2, GPIO_FN_RFSPO7, -	GPIO_FN_B_SYNLD1, -	GPIO_FN_B_SYNLD2, GPIO_FN_SYSENMSK, -	GPIO_FN_XMAINPS, -	GPIO_FN_XDIVPS, -	GPI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_FN_MFG0_OUT1, GPIO_FN_TPU0TO0, -	GPIO_FN_A0_EA0, GPIO_FN_BS, -	GPIO_FN_A12_EA12, GPIO_FN_PORT58_VIO_CKOR, GPIO_FN_TPU4TO2, -	GPIO_FN_A13_EA13, GPIO_FN_PORT59_IROUT, GPIO_FN_MFG0_OUT2, -	GPIO_FN_TPU0TO1, -	GPIO_FN_A14_EA14, GPIO_FN_PORT60_KEYOUT5, -	GPIO_FN_A15_EA15, GPIO_FN_PORT61_KEYOUT4, -	GPIO_FN_A16_EA16, GPIO_FN_PORT62_KEYOUT3, GPIO_FN_MSIOF0_SS1, -	GPIO_FN_A17_EA17, GPIO_FN_PORT63_KEYOUT2, GPIO_FN_MSIOF0_TSYNC, -	GPIO_FN_A18_EA18, GPIO_FN_PORT64_KEYOUT1, GPIO_FN_MSIOF0_TSCK, -	GPIO_FN_A19_EA19, GPIO_FN_PORT65_KEYOUT0, GPIO_FN_MSIOF0_TXD, -	GPIO_FN_A20_EA20, GPIO_FN_PORT66_KEYIN0, GPIO_FN_MSIOF0_RSCK, -	GPIO_FN_A21_EA21, GPIO_FN_PORT67_KEYIN1, GPIO_FN_MSIOF0_RSYNC, -	GPIO_FN_A22_EA22, GPIO_FN_PORT68_KEYIN2, GPIO_FN_MSIOF0_MCK0, -	GPIO_FN_A23_EA23, GPIO_FN_PORT69_KEYIN3, GPIO_FN_MSIOF0_MCK1, -	GPIO_FN_A24_EA24, GPIO_FN_PORT70_KEYIN4, GPIO_FN_MSIOF0_RXD, -	GPIO_FN_A25_EA25, GPIO_FN_PORT71_KEYIN5, GPIO_FN_MSIOF0_SS2, -	GPIO_FN_A26, GPIO_FN_PORT72_KEYIN6, -	GPIO_FN_D0_ED0_NAF0, -	GPIO_FN_D1_ED1_NAF1, -	GPIO_FN_D2_ED2_NAF2, -	GPIO_FN_D3_ED3_NAF3, -	GPIO_FN_D4_ED4_NAF4, -	GPIO_FN_D5_ED5_NAF5, -	GPIO_FN_D6_ED6_NAF6, -	GPIO_FN_D7_ED7_NAF7, -	GPIO_FN_D8_ED8_NAF8, -	GPIO_FN_D9_ED9_NAF9, -	GPIO_FN_D10_ED10_NAF10, -	GPIO_FN_D11_ED11_NAF11, -	GPIO_FN_D12_ED12_NAF12, -	GPIO_FN_D13_ED13_NAF13, -	GPIO_FN_D14_ED14_NAF14, -	GPIO_FN_D15_ED15_NAF15, -	GPIO_FN_CS4, -	GPIO_FN_CS5A, GPIO_FN_FMSICK, -	GPIO_FN_CS5B, GPIO_FN_FCE1, - -	/* 55-3 (FN) */ -	GPIO_FN_CS6B, GPIO_FN_XCS2, GPIO_FN_CS6A, GPIO_FN_DACK0, -	GPIO_FN_FCE0, -	GPIO_FN_WAIT, GPIO_FN_DREQ0, -	GPIO_FN_RD_XRD, -	GPIO_FN_WE0_XWR0_FWE, -	GPIO_FN_WE1_XWR1, -	GPIO_FN_FRB, -	GPIO_FN_CKO, -	GPIO_FN_NBRSTOUT, -	GPIO_FN_NBRST, -	GPIO_FN_GPS_EPPSIN, -	GPIO_FN_LATCHPULSE, -	GPIO_FN_LTESIGNAL, -	GPIO_FN_LEGACYSTATE, -	GPIO_FN_TCKON, -	GPIO_FN_VIO_VD, GPIO_FN_PORT128_KEYOUT0, GPIO_FN_IPORT0, -	GPIO_FN_VIO_HD, GPIO_FN_PORT129_KEYOUT1, GPIO_FN_IPORT1, -	GPIO_FN_VIO_D0, GPIO_FN_PORT130_KEYOUT2, GPIO_FN_PORT130_MSIOF2_RXD, -	GPIO_FN_VIO_D1, GPIO_FN_PORT131_KEYOUT3, GPIO_FN_PORT131_MSIOF2_SS1, -	GPIO_FN_VIO_D2, GPIO_FN_PORT132_KEYOUT4, GPIO_FN_PORT132_MSIOF2_SS2, -	GPIO_FN_VIO_D3, GPIO_FN_PORT133_KEYOUT5, GPIO_FN_PORT133_MSIOF2_TSYNC, -	GPIO_FN_VIO_D4, GPIO_FN_PORT134_KEYIN0, GPIO_FN_PORT134_MSIOF2_TXD, -	GPIO_FN_VIO_D5, GPIO_FN_PORT135_KEYIN1, GPIO_FN_PORT135_MSIOF2_TSCK, -	GPIO_FN_VIO_D6, GPIO_FN_PORT136_KEYIN2, -	GPIO_FN_VIO_D7, GPIO_FN_PORT137_KEYIN3, -	GPIO_FN_VIO_D8, GPIO_FN_M9_SLCD_A01, GPIO_FN_PORT138_FSIAOMC, -	GPIO_FN_VIO_D9, GPIO_FN_M10_SLCD_CK1, GPIO_FN_PORT139_FSIAOLR, -	GPIO_FN_VIO_D10, GPIO_FN_M11_SLCD_SO1, GPIO_FN_TPU0TO2, -	GPIO_FN_PORT140_FSIAOBT, -	GPIO_FN_VIO_D11, GPIO_FN_M12_SLCD_CE1, GPIO_FN_TPU0TO3, -	GPIO_FN_PORT141_FSIAOSLD, -	GPIO_FN_VIO_D12, GPIO_FN_M13_BSW, GPIO_FN_PORT142_FSIACK, -	GPIO_FN_VIO_D13, GPIO_FN_M14_GSW, GPIO_FN_PORT143_FSIAILR, -	GPIO_FN_VIO_D14, GPIO_FN_M15_RSW, GPIO_FN_PORT144_FSIAIBT, -	GPIO_FN_VIO_D15, GPIO_FN_TPU1TO3, GPIO_FN_PORT145_FSIAISLD, -	GPIO_FN_VIO_CLK, GPIO_FN_PORT146_KEYIN4, GPIO_FN_IPORT2, -	GPIO_FN_VIO_FIELD, GPIO_FN_PORT147_KEYIN5, -	GPIO_FN_VIO_CKO, GPIO_FN_PORT148_KEYIN6, -	GPIO_FN_A27, GPIO_FN_RDWR_XWE, GPIO_FN_MFG0_IN1, -	GPIO_FN_MFG0_IN2, -	GPIO_FN_TS_SPSYNC3, GPIO_FN_MSIOF2_RSCK, -	GPIO_FN_TS_SDAT3, GPIO_FN_MSIOF2_RSYNC, -	GPIO_FN_TPU1TO2, GPIO_FN_TS_SDEN3, GPIO_FN_PORT153_MSIOF2_SS1, -	GPIO_FN_SOUT3, GPIO_FN_SCIFA2_TXD1, GPIO_FN_MSIOF2_MCK0, -	GPIO_FN_SIN3, GPIO_FN_SCIFA2_RXD1, GPIO_FN_MSIOF2_MCK1, -	GPIO_FN_XRTS3, GPIO_FN_SCIFA2_RTS1, GPIO_FN_PORT156_MSIOF2_SS2, -	GPIO_FN_XCTS3, GPIO_FN_SCIFA2_CTS1, GPIO_FN_PORT157_MSIOF2_RXD, - -	/* 55-4 (FN) */ -	GPIO_FN_DINT, GPIO_FN_SCIFA2_SCK1, GPIO_FN_TS_SCK3, -	GPIO_FN_PORT159_SCIFB_SCK, GPIO_FN_PORT159_SCIFA5_SCK, GPIO_FN_NMI, -	GPIO_FN_PORT160_SCIFB_TXD, GPIO_FN_PORT160_SCIFA5_TXD, GPIO_FN_SOUT0, -	GPIO_FN_PORT161_SCIFB_CTS, GPIO_FN_PORT161_SCIFA5_CTS, GPIO_FN_XCTS0, -	GPIO_FN_MFG3_IN2, -	GPIO_FN_PORT162_SCIFB_RXD, GPIO_FN_PORT162_SCIFA5_RXD, GPIO_FN_SIN0, -	GPIO_FN_MFG3_IN1, -	GPIO_FN_PORT163_SCIFB_RTS, GPIO_FN_PORT163_SCIFA5_RTS, GPIO_FN_XRTS0, -	GPIO_FN_MFG3_OUT1, -	GPIO_FN_TPU3TO0, -	GPIO_FN_LCDD0, GPIO_FN_PORT192_KEYOUT0, GPIO_FN_EXT_CKI, -	GPIO_FN_LCDD1, GPIO_FN_PORT193_KEYOUT1, GPIO_FN_PORT193_SCIFA5_CTS, -	GPIO_FN_BBIF2_TSYNC1, -	GPIO_FN_LCDD2, GPIO_FN_PORT194_KEYOUT2, GPIO_FN_PORT194_SCIFA5_RTS, -	GPIO_FN_BBIF2_TSCK1, -	GPIO_FN_LCDD3, GPIO_FN_PORT195_KEYOUT3, GPIO_FN_PORT195_SCIFA5_RXD, -	GPIO_FN_BBIF2_TXD1, -	GPIO_FN_LCDD4, GPIO_FN_PORT196_KEYOUT4, GPIO_FN_PORT196_SCIFA5_TXD, -	GPIO_FN_LCDD5, GPIO_FN_PORT197_KEYOUT5, GPIO_FN_PORT197_SCIFA5_SCK, -	GPIO_FN_MFG2_OUT2, GPIO_FN_TPU2TO1, -	GPIO_FN_LCDD6, GPIO_FN_XWR2, -	GPIO_FN_LCDD7, GPIO_FN_TPU4TO1, GPIO_FN_MFG4_OUT2, GPIO_FN_XWR3, -	GPIO_FN_LCDD8, GPIO_FN_PORT200_KEYIN0, GPIO_FN_VIO_DR0, GPIO_FN_D16, -	GPIO_FN_ED16, -	GPIO_FN_LCDD9, GPIO_FN_PORT201_KEYIN1, GPIO_FN_VIO_DR1, GPIO_FN_D17, -	GPIO_FN_ED17, -	GPIO_FN_LCDD10, GPIO_FN_PORT202_KEYIN2, GPIO_FN_VIO_DR2, GPIO_FN_D18, -	GPIO_FN_ED18, -	GPIO_FN_LCDD11, GPIO_FN_PORT203_KEYIN3, GPIO_FN_VIO_DR3, GPIO_FN_D19, -	GPIO_FN_ED19, -	GPIO_FN_LCDD12, GPIO_FN_PORT204_KEYIN4, GPIO_FN_VIO_DR4, GPIO_FN_D20, -	GPIO_FN_ED20, -	GPIO_FN_LCDD13, GPIO_FN_PORT205_KEYIN5, GPIO_FN_VIO_DR5, GPIO_FN_D21, -	GPIO_FN_ED21, -	GPIO_FN_LCDD14, GPIO_FN_PORT206_KEYIN6, GPIO_FN_VIO_DR6, GPIO_FN_D22, -	GPIO_FN_ED22, -	GPIO_FN_LCDD15, GPIO_FN_PORT207_MSIOF0L_SS1, GPIO_FN_PORT207_KEYOUT0, -	GPIO_FN_VIO_DR7, -	GPIO_FN_D23, GPIO_FN_ED23, -	GPIO_FN_LCDD16, GPIO_FN_PORT208_MSIOF0L_SS2, GPIO_FN_PORT208_KEYOUT1, -	GPIO_FN_VIO_VDR, -	GPIO_FN_D24, GPIO_FN_ED24, -	GPIO_FN_LCDD17, GPIO_FN_PORT209_KEYOUT2, GPIO_FN_VIO_HDR, GPIO_FN_D25, -	GPIO_FN_ED25, -	GPIO_FN_LCDD18, GPIO_FN_DREQ2, GPIO_FN_PORT210_MSIOF0L_SS1, GPIO_FN_D26, -	GPIO_FN_ED26, -	GPIO_FN_LCDD19, GPIO_FN_PORT211_MSIOF0L_SS2, GPIO_FN_D27, GPIO_FN_ED27, -	GPIO_FN_LCDD20, GPIO_FN_TS_SPSYNC1, GPIO_FN_MSIOF0L_MCK0, GPIO_FN_D28, -	GPIO_FN_ED28, -	GPIO_FN_LCDD21, GPIO_FN_TS_SDAT1, GPIO_FN_MSIOF0L_MCK1, GPIO_FN_D29, -	GPIO_FN_ED29, -	GPIO_FN_LCDD22, GPIO_FN_TS_SDEN1, GPIO_FN_MSIOF0L_RSCK, GPIO_FN_D30, -	GPIO_FN_ED30, -	GPIO_FN_LCDD23, GPIO_FN_TS_SCK1, GPIO_FN_MSIOF0L_RSYNC, GPIO_FN_D31, -	GPIO_FN_ED31, -	GPIO_FN_LCDDCK, GPIO_FN_LCDWR, GPIO_FN_PORT216_KEYOUT3, -	GPIO_FN_VIO_CLKR, -	GPIO_FN_LCDRD, GPIO_FN_DACK2, GPIO_FN_MSIOF0L_TSYNC, -	GPIO_FN_LCDHSYN, GPIO_FN_LCDCS, GPIO_FN_LCDCS2, GPIO_FN_DACK3, -	GPIO_FN_PORT218_VIO_CKOR, GPIO_FN_PORT218_KEYOUT4, -	GPIO_FN_LCDDISP, GPIO_FN_LCDRS, GPIO_FN_DREQ3, GPIO_FN_MSIOF0L_TSCK, -	GPIO_FN_LCDVSYN, GPIO_FN_LCDVSYN2, GPIO_FN_PORT220_KEYOUT5, -	GPIO_FN_LCDLCLK, GPIO_FN_DREQ1, GPIO_FN_PWEN, GPIO_FN_MSIOF0L_RXD, -	GPIO_FN_LCDDON, GPIO_FN_LCDDON2, GPIO_FN_DACK1, GPIO_FN_OVCN, -	GPIO_FN_MSIOF0L_TXD, -	GPIO_FN_SCIFA1_TXD, GPIO_FN_OVCN2, -	GPIO_FN_EXTLP, GPIO_FN_SCIFA1_SCK, GPIO_FN_USBTERM, -	GPIO_FN_PORT226_VIO_CKO2, -	GPIO_FN_SCIFA1_RTS, GPIO_FN_IDIN, -	GPIO_FN_SCIFA1_RXD, -	GPIO_FN_SCIFA1_CTS, GPIO_FN_MFG1_IN1, -	GPIO_FN_MSIOF1_TXD, GPIO_FN_SCIFA2_TXD2, GPIO_FN_PORT230_FSIAOMC, -	GPIO_FN_MSIOF1_TSYNC, GPIO_FN_SCIFA2_CTS2, GPIO_FN_PORT231_FSIAOLR, -	GPIO_FN_MSIOF1_TSCK, GPIO_FN_SCIFA2_SCK2, GPIO_FN_PORT232_FSIAOBT, -	GPIO_FN_MSIOF1_RXD, GPIO_FN_SCIFA2_RXD2, GPIO_FN_GPS_VCOTRIG, -	GPIO_FN_PORT233_FSIACK, -	GPIO_FN_MSIOF1_RSCK, GPIO_FN_SCIFA2_RTS2, GPIO_FN_PORT234_FSIAOSLD, -	GPIO_FN_MSIOF1_RSYNC, GPIO_FN_OPORT0, GPIO_FN_MFG1_IN2, -	GPIO_FN_PORT235_FSIAILR, -	GPIO_FN_MSIOF1_MCK0, GPIO_FN_I2C_SDA2, GPIO_FN_PORT236_FSIAIBT, -	GPIO_FN_MSIOF1_MCK1, GPIO_FN_I2C_SCL2, GPIO_FN_PORT237_FSIAISLD, -	GPIO_FN_MSIOF1_SS1, GPIO_FN_EDBGREQ3, - -	/* 55-5 (FN) */ -	GPIO_FN_MSIOF1_SS2, -	GPIO_FN_SCIFA6_TXD, -	GPIO_FN_PORT241_IRDA_OUT, GPIO_FN_PORT241_IROUT, GPIO_FN_MFG4_OUT1, -	GPIO_FN_TPU4TO0, -	GPIO_FN_PORT242_IRDA_IN, GPIO_FN_MFG4_IN2, -	GPIO_FN_PORT243_IRDA_FIRSEL, GPIO_FN_PORT243_VIO_CKO2, -	GPIO_FN_PORT244_SCIFA5_CTS, GPIO_FN_MFG2_IN1, GPIO_FN_PORT244_SCIFB_CTS, -	GPIO_FN_PORT244_MSIOF2_RXD, -	GPIO_FN_PORT245_SCIFA5_RTS, GPIO_FN_MFG2_IN2, GPIO_FN_PORT245_SCIFB_RTS, -	GPIO_FN_PORT245_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ETOUTS, -}; - -#endif /* __ASM_SH7377_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/include/mach/sh73a0.h new file mode 100644 index 00000000000..359b582dc27 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/sh73a0.h @@ -0,0 +1,91 @@ +#ifndef __ASM_SH73A0_H__ +#define __ASM_SH73A0_H__ + +/* DMA slave IDs */ +enum { +	SHDMA_SLAVE_INVALID, +	SHDMA_SLAVE_SCIF0_TX, +	SHDMA_SLAVE_SCIF0_RX, +	SHDMA_SLAVE_SCIF1_TX, +	SHDMA_SLAVE_SCIF1_RX, +	SHDMA_SLAVE_SCIF2_TX, +	SHDMA_SLAVE_SCIF2_RX, +	SHDMA_SLAVE_SCIF3_TX, +	SHDMA_SLAVE_SCIF3_RX, +	SHDMA_SLAVE_SCIF4_TX, +	SHDMA_SLAVE_SCIF4_RX, +	SHDMA_SLAVE_SCIF5_TX, +	SHDMA_SLAVE_SCIF5_RX, +	SHDMA_SLAVE_SCIF6_TX, +	SHDMA_SLAVE_SCIF6_RX, +	SHDMA_SLAVE_SCIF7_TX, +	SHDMA_SLAVE_SCIF7_RX, +	SHDMA_SLAVE_SCIF8_TX, +	SHDMA_SLAVE_SCIF8_RX, +	SHDMA_SLAVE_SDHI0_TX, +	SHDMA_SLAVE_SDHI0_RX, +	SHDMA_SLAVE_SDHI1_TX, +	SHDMA_SLAVE_SDHI1_RX, +	SHDMA_SLAVE_SDHI2_TX, +	SHDMA_SLAVE_SDHI2_RX, +	SHDMA_SLAVE_MMCIF_TX, +	SHDMA_SLAVE_MMCIF_RX, +	SHDMA_SLAVE_FSI2A_TX, +	SHDMA_SLAVE_FSI2A_RX, +	SHDMA_SLAVE_FSI2B_TX, +	SHDMA_SLAVE_FSI2B_RX, +	SHDMA_SLAVE_FSI2C_TX, +	SHDMA_SLAVE_FSI2C_RX, +	SHDMA_SLAVE_FSI2D_RX, +}; + +/* + *		SH73A0 IRQ LOCATION TABLE + * + * 416	----------------------------------------- + *		IRQ0-IRQ15 + * 431	----------------------------------------- + * ... + * 448	----------------------------------------- + *		sh73a0-intcs + *		sh73a0-intca-irq-pins + * 680	----------------------------------------- + * ... + * 700	----------------------------------------- + *		sh73a0-pint0 + * 731	----------------------------------------- + * 732	----------------------------------------- + *		sh73a0-pint1 + * 739	----------------------------------------- + * ... + * 800	----------------------------------------- + *		IRQ16-IRQ31 + * 815	----------------------------------------- + * ... + * 928	----------------------------------------- + *		sh73a0-intca-irq-pins + * 943	----------------------------------------- + */ + +/* PINT interrupts are located at Linux IRQ 700 and up */ +#define SH73A0_PINT0_IRQ(irq) ((irq) + 700) +#define SH73A0_PINT1_IRQ(irq) ((irq) + 732) + +extern void sh73a0_init_delay(void); +extern void sh73a0_init_irq(void); +extern void sh73a0_init_irq_dt(void); +extern void sh73a0_map_io(void); +extern void sh73a0_earlytimer_init(void); +extern void sh73a0_add_early_devices(void); +extern void sh73a0_add_standard_devices(void); +extern void sh73a0_add_standard_devices_dt(void); +extern void sh73a0_clock_init(void); +extern void sh73a0_pinmux_init(void); +extern void sh73a0_pm_init(void); +extern struct clk sh73a0_extal1_clk; +extern struct clk sh73a0_extal2_clk; +extern struct clk sh73a0_extcki_clk; +extern struct clk sh73a0_extalr_clk; +extern struct smp_operations sh73a0_smp_ops; + +#endif /* __ASM_SH73A0_H__ */ diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h index 76a687eeaa2..540eaff08f3 100644 --- a/arch/arm/mach-shmobile/include/mach/system.h +++ b/arch/arm/mach-shmobile/include/mach/system.h @@ -1,14 +1,11 @@  #ifndef __ASM_ARCH_SYSTEM_H  #define __ASM_ARCH_SYSTEM_H -static inline void arch_idle(void) -{ -	cpu_do_idle(); -} +#include <asm/system_misc.h>  static inline void arch_reset(char mode, const char *cmd)  { -	cpu_reset(0); +	soft_restart(0);  }  #endif diff --git a/arch/arm/mach-shmobile/include/mach/timex.h b/arch/arm/mach-shmobile/include/mach/timex.h deleted file mode 100644 index ae0d8d825c2..00000000000 --- a/arch/arm/mach-shmobile/include/mach/timex.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_MACH_TIMEX_H -#define __ASM_MACH_TIMEX_H - -#define CLOCK_TICK_RATE		1193180 /* unused i8253 PIT value */ - -#endif /* __ASM_MACH_TIMEX_H */ diff --git a/arch/arm/mach-shmobile/include/mach/uncompress.h b/arch/arm/mach-shmobile/include/mach/uncompress.h index 0bd7556b138..f1aee56781e 100644 --- a/arch/arm/mach-shmobile/include/mach/uncompress.h +++ b/arch/arm/mach-shmobile/include/mach/uncompress.h @@ -16,6 +16,4 @@ static void arch_decomp_setup(void)  {  } -#define arch_decomp_wdog() -  #endif /* __ASM_MACH_UNCOMPRESS_H */ diff --git a/arch/arm/mach-shmobile/include/mach/vmalloc.h b/arch/arm/mach-shmobile/include/mach/vmalloc.h deleted file mode 100644 index 4aecf6e3a85..00000000000 --- a/arch/arm/mach-shmobile/include/mach/vmalloc.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __ASM_MACH_VMALLOC_H -#define __ASM_MACH_VMALLOC_H - -/* Vmalloc at ... - 0xe5ffffff */ -#define VMALLOC_END 0xe6000000 - -#endif /* __ASM_MACH_VMALLOC_H */ diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h new file mode 100644 index 00000000000..727cc78ac8e --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/zboot.h @@ -0,0 +1,22 @@ +#ifndef ZBOOT_H +#define ZBOOT_H + +#include <mach/zboot_macros.h> + +/************************************************** + * + *		board specific settings + * + **************************************************/ + +#ifdef CONFIG_MACH_MACKEREL +#define MEMORY_START	0x40000000 +#include "mach/head-mackerel.txt" +#elif defined(CONFIG_MACH_KZM9G) || defined(CONFIG_MACH_KZM9G_REFERENCE) +#define MEMORY_START	0x43000000 +#include "mach/head-kzm9g.txt" +#else +#error "unsupported board." +#endif + +#endif /* ZBOOT_H */ diff --git a/arch/arm/mach-shmobile/include/mach/zboot_macros.h b/arch/arm/mach-shmobile/include/mach/zboot_macros.h new file mode 100644 index 00000000000..14fd3d538e9 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/zboot_macros.h @@ -0,0 +1,108 @@ +#ifndef __ZBOOT_MACRO_H +#define __ZBOOT_MACRO_H + +/* The LIST command is used to include comments in the script */ +.macro	LIST comment +.endm + +/* The ED command is used to write a 32-bit word */ +.macro ED, addr, data +	LDR	r0, 1f +	LDR	r1, 2f +	STR	r1, [r0] +	B	3f +1 :	.long	\addr +2 :	.long	\data +3 : +.endm + +/* The EW command is used to write a 16-bit word */ +.macro EW, addr, data +	LDR	r0, 1f +	LDR	r1, 2f +	STRH	r1, [r0] +	B	3f +1 :	.long	\addr +2 :	.long	\data +3 : +.endm + +/* The EB command is used to write an 8-bit word */ +.macro EB, addr, data +	LDR	r0, 1f +	LDR	r1, 2f +	STRB	r1, [r0] +	B	3f +1 :	.long	\addr +2 :	.long	\data +3 : +.endm + +/* The WAIT command is used to delay the execution */ +.macro  WAIT, time, reg +	LDR	r1, 1f +	LDR	r0, 2f +	STR	r0, [r1] +10 : +	LDR	r0, [r1] +	CMP	r0, #0x00000000 +	BNE	10b +	NOP +	B	3f +1 :	.long	\reg +2 :	.long	\time * 100 +3 : +.endm + +/* The DD command is used to read a 32-bit word */ +.macro  DD, start, end +	LDR	r1, 1f +	B	2f +1 :	.long	\start +2 : +.endm + +/* loop until a given value has been read (with mask) */ +.macro WAIT_MASK, addr, data, cmp +	LDR	r0, 2f +	LDR	r1, 3f +	LDR	r2, 4f +1: +	LDR	r3, [r0, #0] +	AND	r3, r1, r3 +	CMP	r2, r3 +	BNE	1b +	B	5f +2:	.long	\addr +3:	.long	\data +4:	.long	\cmp +5: +.endm + +/* read 32-bit value from addr, "or" an immediate and write back */ +.macro ED_OR, addr, data +	LDR r4, 1f +	LDR r5, 2f +	LDR r6, [r4] +	ORR r5, r6, r5 +	STR r5, [r4] +	B	3f +1:	.long	\addr +2:	.long	\data +3: +.endm + +/* read 32-bit value from addr, "and" an immediate and write back */ +.macro ED_AND, addr, data +	LDR r4, 1f +	LDR r5, 2f +	LDR r6, [r4] +	AND r5, r6, r5 +	STR r5, [r4] +	B	3f +1:	.long \addr +2:	.long \data +3: +.endm + +#endif /* __ZBOOT_MACRO_H */  | 
