diff options
Diffstat (limited to 'arch/arm/mach-omap2')
| -rw-r--r-- | arch/arm/mach-omap2/Kconfig | 1 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/Makefile.boot | 6 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 5 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 27 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/timer.c | 6 | 
5 files changed, 44 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index fcd4e85c4dd..c1309495eeb 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -18,6 +18,7 @@ config ARCH_OMAP2PLUS_TYPICAL  	select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4  	select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4  	select HIGHMEM +	select PINCTRL  	help  	  Compile a kernel suitable for booting most boards diff --git a/arch/arm/mach-omap2/Makefile.boot b/arch/arm/mach-omap2/Makefile.boot index b03e562acc6..be0fe9226d6 100644 --- a/arch/arm/mach-omap2/Makefile.boot +++ b/arch/arm/mach-omap2/Makefile.boot @@ -1,3 +1,9 @@    zreladdr-y		+= 0x80008000  params_phys-y		:= 0x80000100  initrd_phys-y		:= 0x80800000 + +dtb-$(CONFIG_SOC_OMAP2420)	+= omap2420-h4.dtb +dtb-$(CONFIG_ARCH_OMAP3)	+= omap3-beagle-xm.dtb omap3-evm.dtb omap3-tobi.dtb +dtb-$(CONFIG_ARCH_OMAP4)	+= omap4-panda.dtb omap4-pandaES.dtb +dtb-$(CONFIG_ARCH_OMAP4)	+= omap4-var_som.dtb omap4-sdp.dtb +dtb-$(CONFIG_SOC_OMAP5)		+= omap5-evm.dtb diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 73c1440a825..3cd2564ed5c 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -170,7 +170,10 @@ static int __init omap_l2_cache_init(void)  	/* Enable PL310 L2 Cache controller */  	omap_smc1(0x102, 0x1); -	l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK); +	if (of_have_populated_dt()) +		l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK); +	else +		l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);  	/*  	 * Override default outer_cache.disable with a OMAP4 diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 9db1684df69..4c6b5a77405 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -3158,6 +3158,33 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)  }  /** + * omap_hwmod_fill_dma_resources - fill struct resource array with dma data + * @oh: struct omap_hwmod * + * @res: pointer to the array of struct resource to fill + * + * Fill the struct resource array @res with dma resource data from the + * omap_hwmod @oh.  Intended to be called by code that registers + * omap_devices.  See also omap_hwmod_count_resources().  Returns the + * number of array elements filled. + */ +int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res) +{ +	int i, sdma_reqs_cnt; +	int r = 0; + +	sdma_reqs_cnt = _count_sdma_reqs(oh); +	for (i = 0; i < sdma_reqs_cnt; i++) { +		(res + r)->name = (oh->sdma_reqs + i)->name; +		(res + r)->start = (oh->sdma_reqs + i)->dma_req; +		(res + r)->end = (oh->sdma_reqs + i)->dma_req; +		(res + r)->flags = IORESOURCE_DMA; +		r++; +	} + +	return r; +} + +/**   * omap_hwmod_get_resource_byname - fetch IP block integration data by name   * @oh: struct omap_hwmod * to operate on   * @type: one of the IORESOURCE_* constants from include/linux/ioport.h diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 25cbe73b0cd..e2084facca5 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -36,6 +36,7 @@  #include <linux/clocksource.h>  #include <linux/clockchips.h>  #include <linux/slab.h> +#include <linux/of.h>  #include <asm/mach/time.h>  #include <asm/smp_twd.h> @@ -387,6 +388,11 @@ static void __init omap4_timer_init(void)  	if (omap_rev() != OMAP4430_REV_ES1_0) {  		int err; +		if (of_have_populated_dt()) { +			twd_local_timer_of_register(); +			return; +		} +  		err = twd_local_timer_register(&twd_local_timer);  		if (err)  			pr_err("twd_local_timer_register failed %d\n", err);  |