diff options
Diffstat (limited to 'arch/arm/mach-shmobile/board-bockw-reference.c')
| -rw-r--r-- | arch/arm/mach-shmobile/board-bockw-reference.c | 48 | 
1 files changed, 36 insertions, 12 deletions
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c index 1a7c893e1a5..027373f8de8 100644 --- a/arch/arm/mach-shmobile/board-bockw-reference.c +++ b/arch/arm/mach-shmobile/board-bockw-reference.c @@ -19,7 +19,6 @@   */  #include <linux/of_platform.h> -#include <linux/pinctrl/machine.h>  #include <mach/common.h>  #include <mach/r8a7778.h>  #include <asm/mach/arch.h> @@ -28,23 +27,48 @@   *	see board-bock.c for checking detail of dip-switch   */ -static const struct pinctrl_map bockw_pinctrl_map[] = { -	/* SCIF0 */ -	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", -				  "scif0_data_a", "scif0"), -	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", -				  "scif0_ctrl", "scif0"), -}; +#define FPGA	0x18200000 +#define IRQ0MR	0x30 +#define COMCTLR	0x101c +#define PFC	0xfffc0000 +#define PUPR4	0x110  static void __init bockw_init(void)  { -	r8a7778_clock_init(); +	void __iomem *fpga; +	void __iomem *pfc; -	pinctrl_register_mappings(bockw_pinctrl_map, -				  ARRAY_SIZE(bockw_pinctrl_map)); -	r8a7778_pinmux_init(); +	r8a7778_clock_init(); +	r8a7778_init_irq_extpin_dt(1);  	r8a7778_add_dt_devices(); +	fpga = ioremap_nocache(FPGA, SZ_1M); +	if (fpga) { +		/* +		 * CAUTION +		 * +		 * IRQ0/1 is cascaded interrupt from FPGA. +		 * it should be cared in the future +		 * Now, it is assuming IRQ0 was used only from SMSC. +		 */ +		u16 val = ioread16(fpga + IRQ0MR); +		val &= ~(1 << 4); /* enable SMSC911x */ +		iowrite16(val, fpga + IRQ0MR); + +		iounmap(fpga); +	} + +	pfc = ioremap_nocache(PFC, 0x200); +	if (pfc) { +		/* +		 * FIXME +		 * +		 * SDHI CD/WP pin needs pull-up +		 */ +		iowrite32(ioread32(pfc + PUPR4) | (3 << 26), pfc + PUPR4); +		iounmap(pfc); +	} +  	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);  }  | 
