diff options
Diffstat (limited to 'arch/arm/cpu')
| -rw-r--r-- | arch/arm/cpu/arm926ejs/at91/eflash.c | 2 | ||||
| -rw-r--r-- | arch/arm/cpu/arm926ejs/kirkwood/cpu.c | 2 | ||||
| -rw-r--r-- | arch/arm/cpu/armv7/at91/sama5d3_devices.c | 12 | ||||
| -rw-r--r-- | arch/arm/cpu/armv7/exynos/clock.c | 59 | ||||
| -rw-r--r-- | arch/arm/cpu/armv7/exynos/pinmux.c | 23 | ||||
| -rw-r--r-- | arch/arm/cpu/armv7/nonsec_virt.S | 18 | ||||
| -rw-r--r-- | arch/arm/cpu/armv7/omap5/hw_data.c | 10 | ||||
| -rw-r--r-- | arch/arm/cpu/armv7/omap5/prcm-regs.c | 1 | ||||
| -rw-r--r-- | arch/arm/cpu/armv7/virt-v7.c | 20 | 
9 files changed, 89 insertions, 58 deletions
| diff --git a/arch/arm/cpu/arm926ejs/at91/eflash.c b/arch/arm/cpu/arm926ejs/at91/eflash.c index 3e21cdb2f..3f3926428 100644 --- a/arch/arm/cpu/arm926ejs/at91/eflash.c +++ b/arch/arm/cpu/arm926ejs/at91/eflash.c @@ -28,7 +28,7 @@   * by u-Boot commands.   *   * Note: Redundant environment will not work in this flash since - * it does use partial page writes. Make sure the environent spans + * it does use partial page writes. Make sure the environment spans   * whole pages!   */ diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c index cde3172fe..d4711c070 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c @@ -302,7 +302,7 @@ int arch_cpu_init(void)  	/*  	 * Configures the I/O voltage of the pads connected to Egigabit  	 * Ethernet interface to 1.8V -	 * By defult it is set to 3.3V +	 * By default it is set to 3.3V  	 */  	reg = readl(KW_REG_MPP_OUT_DRV_REG);  	reg |= (1 << 7); diff --git a/arch/arm/cpu/armv7/at91/sama5d3_devices.c b/arch/arm/cpu/armv7/at91/sama5d3_devices.c index e55e1c660..51f0a6dff 100644 --- a/arch/arm/cpu/armv7/at91/sama5d3_devices.c +++ b/arch/arm/cpu/armv7/at91/sama5d3_devices.c @@ -202,3 +202,15 @@ void at91_lcd_hw_init(void)  	at91_periph_clk_enable(ATMEL_ID_LCDC);  }  #endif + +#ifdef CONFIG_USB_GADGET_ATMEL_USBA +void at91_udp_hw_init(void) +{ +	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; + +	/* Enable UPLL clock */ +	writel(AT91_PMC_UPLLEN | AT91_PMC_BIASEN, &pmc->uckr); +	/* Enable UDPHS clock */ +	at91_periph_clk_enable(ATMEL_ID_UDPHS); +} +#endif diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c index 0cb1a61aa..36fedd630 100644 --- a/arch/arm/cpu/armv7/exynos/clock.c +++ b/arch/arm/cpu/armv7/exynos/clock.c @@ -282,6 +282,9 @@ static unsigned long exynos5_get_periph_rate(int peripheral)  		src = readl(&clk->src_peric0);  		div = readl(&clk->div_peric3);  		break; +	case PERIPH_ID_I2S0: +		src = readl(&clk->src_mau); +		div = readl(&clk->div_mau);  	case PERIPH_ID_SPI0:  	case PERIPH_ID_SPI1:  		src = readl(&clk->src_peric1); @@ -1146,17 +1149,29 @@ int exynos5_set_epll_clk(unsigned long rate)  	return 0;  } -void exynos5_set_i2s_clk_source(void) +int exynos5_set_i2s_clk_source(unsigned int i2s_id)  {  	struct exynos5_clock *clk =  		(struct exynos5_clock *)samsung_get_base_clock(); +	unsigned int *audio_ass = (unsigned int *)samsung_get_base_audio_ass(); -	clrsetbits_le32(&clk->src_peric1, AUDIO1_SEL_MASK, -			(CLK_SRC_SCLK_EPLL)); +	if (i2s_id == 0) { +		setbits_le32(&clk->src_top2, CLK_SRC_MOUT_EPLL); +		clrsetbits_le32(&clk->src_mau, AUDIO0_SEL_MASK, +				(CLK_SRC_SCLK_EPLL)); +		setbits_le32(audio_ass, AUDIO_CLKMUX_ASS); +	} else if (i2s_id == 1) { +		clrsetbits_le32(&clk->src_peric1, AUDIO1_SEL_MASK, +				(CLK_SRC_SCLK_EPLL)); +	} else { +		return -1; +	} +	return 0;  }  int exynos5_set_i2s_clk_prescaler(unsigned int src_frq, -					unsigned int dst_frq) +				  unsigned int dst_frq, +				  unsigned int i2s_id)  {  	struct exynos5_clock *clk =  		(struct exynos5_clock *)samsung_get_base_clock(); @@ -1169,13 +1184,27 @@ int exynos5_set_i2s_clk_prescaler(unsigned int src_frq,  	}  	div = (src_frq / dst_frq); -	if (div > AUDIO_1_RATIO_MASK) { -		debug("%s: Frequency ratio is out of range\n", __func__); -		debug("src frq = %d des frq = %d ", src_frq, dst_frq); +	if (i2s_id == 0) { +		if (div > AUDIO_0_RATIO_MASK) { +			debug("%s: Frequency ratio is out of range\n", +			      __func__); +			debug("src frq = %d des frq = %d ", src_frq, dst_frq); +			return -1; +		} +		clrsetbits_le32(&clk->div_mau, AUDIO_0_RATIO_MASK, +				(div & AUDIO_0_RATIO_MASK)); +	} else if(i2s_id == 1) { +		if (div > AUDIO_1_RATIO_MASK) { +			debug("%s: Frequency ratio is out of range\n", +			      __func__); +			debug("src frq = %d des frq = %d ", src_frq, dst_frq); +			return -1; +		} +		clrsetbits_le32(&clk->div_peric4, AUDIO_1_RATIO_MASK, +				(div & AUDIO_1_RATIO_MASK)); +	} else {  		return -1;  	} -	clrsetbits_le32(&clk->div_peric4, AUDIO_1_RATIO_MASK, -				(div & AUDIO_1_RATIO_MASK));  	return 0;  } @@ -1415,19 +1444,21 @@ int set_spi_clk(int periph_id, unsigned int rate)  		return 0;  } -int set_i2s_clk_prescaler(unsigned int src_frq, unsigned int dst_frq) +int set_i2s_clk_prescaler(unsigned int src_frq, unsigned int dst_frq, +			  unsigned int i2s_id)  { -  	if (cpu_is_exynos5()) -		return exynos5_set_i2s_clk_prescaler(src_frq, dst_frq); +		return exynos5_set_i2s_clk_prescaler(src_frq, dst_frq, i2s_id);  	else  		return 0;  } -void set_i2s_clk_source(void) +int set_i2s_clk_source(unsigned int i2s_id)  {  	if (cpu_is_exynos5()) -		exynos5_set_i2s_clk_source(); +		return exynos5_set_i2s_clk_source(i2s_id); +	else +		return 0;  }  int set_epll_clk(unsigned long rate) diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c index 1b05ebfd7..8002bce79 100644 --- a/arch/arm/cpu/armv7/exynos/pinmux.c +++ b/arch/arm/cpu/armv7/exynos/pinmux.c @@ -220,10 +220,20 @@ static void exynos5_i2s_config(int peripheral)  {  	int i;  	struct exynos5_gpio_part1 *gpio1 = -		(struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1(); +		(struct exynos5_gpio_part1 *)samsung_get_base_gpio_part1(); +	struct exynos5_gpio_part4 *gpio4 = +		(struct exynos5_gpio_part4 *)samsung_get_base_gpio_part4(); -	for (i = 0; i < 5; i++) -		s5p_gpio_cfg_pin(&gpio1->b0, i, GPIO_FUNC(0x02)); +	switch (peripheral) { +	case PERIPH_ID_I2S0: +		for (i = 0; i < 5; i++) +			s5p_gpio_cfg_pin(&gpio4->z, i, GPIO_FUNC(0x02)); +		break; +	case PERIPH_ID_I2S1: +		for (i = 0; i < 5; i++) +			s5p_gpio_cfg_pin(&gpio1->b0, i, GPIO_FUNC(0x02)); +		break; +	}  }  void exynos5_spi_config(int peripheral) @@ -296,6 +306,7 @@ static int exynos5_pinmux_config(int peripheral, int flags)  	case PERIPH_ID_I2C7:  		exynos5_i2c_config(peripheral, flags);  		break; +	case PERIPH_ID_I2S0:  	case PERIPH_ID_I2S1:  		exynos5_i2s_config(peripheral);  		break; @@ -463,11 +474,11 @@ static int exynos4_pinmux_config(int peripheral, int flags)  int exynos_pinmux_config(int peripheral, int flags)  { -	if (cpu_is_exynos5()) +	if (cpu_is_exynos5()) {  		return exynos5_pinmux_config(peripheral, flags); -	else if (cpu_is_exynos4()) +	} else if (cpu_is_exynos4()) {  		return exynos4_pinmux_config(peripheral, flags); -	else { +	} else {  		debug("pinmux functionality not supported\n");  		return -1;  	} diff --git a/arch/arm/cpu/armv7/nonsec_virt.S b/arch/arm/cpu/armv7/nonsec_virt.S index 358348ffa..24b4c18bd 100644 --- a/arch/arm/cpu/armv7/nonsec_virt.S +++ b/arch/arm/cpu/armv7/nonsec_virt.S @@ -3,23 +3,7 @@   *   * Copyright (c) 2013	Andre Przywara <andre.przywara@linaro.org>   * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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; either version 2 of - * the License, or (at your option) any later version. - * - * 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., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier:	GPL-2.0+   */  #include <config.h> diff --git a/arch/arm/cpu/armv7/omap5/hw_data.c b/arch/arm/cpu/armv7/omap5/hw_data.c index fbbc48662..a1b249e73 100644 --- a/arch/arm/cpu/armv7/omap5/hw_data.c +++ b/arch/arm/cpu/armv7/omap5/hw_data.c @@ -170,7 +170,7 @@ static const struct dpll_params per_dpll_params_768mhz_es2[NUM_SYS_CLKS] = {  static const struct dpll_params per_dpll_params_768mhz_dra7xx[NUM_SYS_CLKS] = {  	{32, 0, 4, 1, 3, 4, 10, 2, -1, -1, -1, -1},		/* 12 MHz   */ -	{96, 4, 4, 1, 3, 4, 10, 2, -1, -1, -1, -1},		/* 20 MHz   */ +	{96, 4, 4, 1, 3, 4, 4, 2, -1, -1, -1, -1},		/* 20 MHz   */  	{160, 6, 4, 1, 3, 4, 10, 2, -1, -1, -1, -1},		/* 16.8 MHz */  	{20, 0, 4, 1, 3, 4, 10, 2, -1, -1, -1, -1},		/* 19.2 MHz */  	{192, 12, 4, 1, 3, 4, 10, 2, -1, -1, -1, -1},		/* 26 MHz   */ @@ -426,6 +426,10 @@ void enable_basic_clocks(void)  #ifdef CONFIG_DRIVER_TI_CPSW  		(*prcm)->cm_gmac_gmac_clkctrl,  #endif + +#ifdef CONFIG_TI_QSPI +		(*prcm)->cm_l4per_qspi_clkctrl, +#endif  		0  	}; @@ -454,6 +458,10 @@ void enable_basic_clocks(void)  			 clk_modules_explicit_en_essential,  			 1); +#ifdef CONFIG_TI_QSPI +	setbits_le32((*prcm)->cm_l4per_qspi_clkctrl, (1<<24)); +#endif +  	/* Enable SCRM OPT clocks for PER and CORE dpll */  	setbits_le32((*prcm)->cm_wkupaon_scrm_clkctrl,  			OPTFCLKEN_SCRM_PER_MASK); diff --git a/arch/arm/cpu/armv7/omap5/prcm-regs.c b/arch/arm/cpu/armv7/omap5/prcm-regs.c index 5a3d52c11..7a7caded0 100644 --- a/arch/arm/cpu/armv7/omap5/prcm-regs.c +++ b/arch/arm/cpu/armv7/omap5/prcm-regs.c @@ -921,6 +921,7 @@ struct prcm_regs const dra7xx_prcm = {  	.cm_l4per_gpio8_clkctrl			= 0x4a009818,  	.cm_l4per_mmcsd3_clkctrl		= 0x4a009820,  	.cm_l4per_mmcsd4_clkctrl		= 0x4a009828, +	.cm_l4per_qspi_clkctrl			= 0x4a009838,  	.cm_l4per_uart1_clkctrl			= 0x4a009840,  	.cm_l4per_uart2_clkctrl			= 0x4a009848,  	.cm_l4per_uart3_clkctrl			= 0x4a009850, diff --git a/arch/arm/cpu/armv7/virt-v7.c b/arch/arm/cpu/armv7/virt-v7.c index 6de7fe781..2cd604f97 100644 --- a/arch/arm/cpu/armv7/virt-v7.c +++ b/arch/arm/cpu/armv7/virt-v7.c @@ -1,28 +1,12 @@  /*   * (C) Copyright 2013 - * Andre Przywara, Linaro + * Andre Przywara, Linaro <andre.przywara@linaro.org>   *   * Routines to transition ARMv7 processors from secure into non-secure state   * and from non-secure SVC into HYP mode   * needed to enable ARMv7 virtualization for current hypervisors   * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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; either version 2 of - * the License, or (at your option) any later version. - * - * 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., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier:	GPL-2.0+   */  #include <common.h> |