public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 04/11] Exynos5422/5800: set cpu id to 0x5422
Date: Mon, 21 Sep 2015 21:47:10 +0900	[thread overview]
Message-ID: <55FFFC4E.6060109@samsung.com> (raw)
In-Reply-To: <1442838403-27777-5-git-send-email-p.marczak@samsung.com>

Hi, Przemyslaw.

On 09/21/2015 09:26 PM, Przemyslaw Marczak wrote:
> The proper CPU ID for those Exynos variants is 0x5422,
> but before the 0x5800 was set. This commit fix this back.
> 
> Changes:
> - set cpu id to 0x5422 instead of 0x5800
> - remove macro proid_is_exynos5800()
> - add macro proid_is_exynos5422()
> - change the calls to proid_is_exynos5800() with new macro
> 
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
> ---
> Changes V2:
> - none
> ---
>  arch/arm/mach-exynos/clock.c              | 16 ++++++++--------
>  arch/arm/mach-exynos/clock_init_exynos5.c |  2 +-
>  arch/arm/mach-exynos/common_setup.h       |  4 ++--
>  arch/arm/mach-exynos/include/mach/cpu.h   |  6 +++---
>  arch/arm/mach-exynos/include/mach/gpio.h  |  4 ++--
>  arch/arm/mach-exynos/pinmux.c             |  2 +-
>  arch/arm/mach-exynos/power.c              |  2 +-
>  7 files changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c
> index 1c6baa1..2d94851 100644
> --- a/arch/arm/mach-exynos/clock.c
> +++ b/arch/arm/mach-exynos/clock.c
> @@ -159,8 +159,8 @@ static int exynos_get_pll_clk(int pllreg, unsigned int r, unsigned int k)
>  			div = PLL_DIV_1024;
>  		else if (proid_is_exynos4412())
>  			div = PLL_DIV_65535;
> -		else if (proid_is_exynos5250() || proid_is_exynos5420()
> -			 || proid_is_exynos5800())
> +		else if (proid_is_exynos5250() || proid_is_exynos5420() ||
> +			 proid_is_exynos5422())
>  			div = PLL_DIV_65536;
>  		else
>  			return 0;
> @@ -346,7 +346,7 @@ static struct clk_bit_info *get_clk_bit_info(int peripheral)
>  	int i;
>  	struct clk_bit_info *info;
>  
> -	if (proid_is_exynos5420() || proid_is_exynos5800())
> +	if (proid_is_exynos5420() || proid_is_exynos5422())
>  		info = exynos542x_bit_info;
>  	else
>  		info = exynos5_bit_info;
> @@ -558,7 +558,7 @@ static unsigned long exynos542x_get_periph_rate(int peripheral)
>  unsigned long clock_get_periph_rate(int peripheral)
>  {
>  	if (cpu_is_exynos5()) {
> -		if (proid_is_exynos5420() || proid_is_exynos5800())
> +		if (proid_is_exynos5420() || proid_is_exynos5422())
>  			return exynos542x_get_periph_rate(peripheral);
>  		return exynos5_get_periph_rate(peripheral);
>  	} else {
> @@ -1576,7 +1576,7 @@ static unsigned long exynos4_get_i2c_clk(void)
>  unsigned long get_pll_clk(int pllreg)
>  {
>  	if (cpu_is_exynos5()) {
> -		if (proid_is_exynos5420() || proid_is_exynos5800())
> +		if (proid_is_exynos5420() || proid_is_exynos5422())
>  			return exynos542x_get_pll_clk(pllreg);
>  		return exynos5_get_pll_clk(pllreg);
>  	} else if (cpu_is_exynos4()) {
> @@ -1694,7 +1694,7 @@ void set_mmc_clk(int dev_index, unsigned int div)
>  		div -= 1;
>  
>  	if (cpu_is_exynos5()) {
> -		if (proid_is_exynos5420() || proid_is_exynos5800())
> +		if (proid_is_exynos5420() || proid_is_exynos5422())
>  			exynos5420_set_mmc_clk(dev_index, div);
>  		else
>  			exynos5_set_mmc_clk(dev_index, div);
> @@ -1710,7 +1710,7 @@ unsigned long get_lcd_clk(void)
>  	} else if (cpu_is_exynos5()) {
>  		if (proid_is_exynos5420())
>  			return exynos5420_get_lcd_clk();
> -		else if (proid_is_exynos5800())
> +		else if (proid_is_exynos5422())
>  			return exynos5800_get_lcd_clk();
>  		else
>  			return exynos5_get_lcd_clk();
> @@ -1742,7 +1742,7 @@ void set_mipi_clk(void)
>  int set_spi_clk(int periph_id, unsigned int rate)
>  {
>  	if (cpu_is_exynos5()) {
> -		if (proid_is_exynos5420() || proid_is_exynos5800())
> +		if (proid_is_exynos5420() || proid_is_exynos5422())
>  			return exynos5420_set_spi_clk(periph_id, rate);
>  		return exynos5_set_spi_clk(periph_id, rate);
>  	}
> diff --git a/arch/arm/mach-exynos/clock_init_exynos5.c b/arch/arm/mach-exynos/clock_init_exynos5.c
> index 0200fd1..1b7498d 100644
> --- a/arch/arm/mach-exynos/clock_init_exynos5.c
> +++ b/arch/arm/mach-exynos/clock_init_exynos5.c
> @@ -971,7 +971,7 @@ static void exynos5420_system_clock_init(void)
>  
>  void system_clock_init(void)
>  {
> -	if (proid_is_exynos5420() || proid_is_exynos5800())
> +	if (proid_is_exynos5420() || proid_is_exynos5422())
>  		exynos5420_system_clock_init();
>  	else
>  		exynos5250_system_clock_init();
> diff --git a/arch/arm/mach-exynos/common_setup.h b/arch/arm/mach-exynos/common_setup.h
> index 67aac2d..2829fb2 100644
> --- a/arch/arm/mach-exynos/common_setup.h
> +++ b/arch/arm/mach-exynos/common_setup.h
> @@ -78,7 +78,7 @@ static inline void configure_l2_ctlr(void)
>  		CACHE_TAG_RAM_LATENCY_2_CYCLES |
>  		CACHE_DATA_RAM_LATENCY_2_CYCLES;
>  
> -	if (proid_is_exynos5420() || proid_is_exynos5800()) {
> +	if (proid_is_exynos5420() || proid_is_exynos5422()) {
>  		val |= CACHE_ECC_AND_PARITY |
>  			CACHE_TAG_RAM_LATENCY_3_CYCLES |
>  			CACHE_DATA_RAM_LATENCY_3_CYCLES;
> @@ -97,7 +97,7 @@ static inline void configure_l2_actlr(void)
>  {
>  	uint32_t val;
>  
> -	if (proid_is_exynos5420() || proid_is_exynos5800()) {
> +	if (proid_is_exynos5420() || proid_is_exynos5422()) {
>  		mrc_l2_aux_ctlr(val);
>  		val |= CACHE_ENABLE_FORCE_L2_LOGIC |
>  			CACHE_DISABLE_CLEAN_EVICT;
> diff --git a/arch/arm/mach-exynos/include/mach/cpu.h b/arch/arm/mach-exynos/include/mach/cpu.h
> index cb3d2cc..14a1692 100644
> --- a/arch/arm/mach-exynos/include/mach/cpu.h
> +++ b/arch/arm/mach-exynos/include/mach/cpu.h
> @@ -237,7 +237,7 @@ static inline void s5p_set_cpu_id(void)
>  		 * Exynos5800 is a variant of Exynos5420
>  		 * and has product id 0x5422
>  		 */

Needs to modify the above comment?

Best Regards,
Jaehoon Chung

> -		s5p_cpu_id = 0x5800;
> +		s5p_cpu_id = 0x5422;
>  		break;
>  	}
>  }
> @@ -267,7 +267,7 @@ IS_EXYNOS_TYPE(exynos4210, 0x4210)
>  IS_EXYNOS_TYPE(exynos4412, 0x4412)
>  IS_EXYNOS_TYPE(exynos5250, 0x5250)
>  IS_EXYNOS_TYPE(exynos5420, 0x5420)
> -IS_EXYNOS_TYPE(exynos5800, 0x5800)
> +IS_EXYNOS_TYPE(exynos5422, 0x5422)
>  
>  #define SAMSUNG_BASE(device, base)				\
>  static inline unsigned int __attribute__((no_instrument_function)) \
> @@ -278,7 +278,7 @@ static inline unsigned int __attribute__((no_instrument_function)) \
>  			return EXYNOS4X12_##base;		\
>  		return EXYNOS4_##base;				\
>  	} else if (cpu_is_exynos5()) {				\
> -		if (proid_is_exynos5420() || proid_is_exynos5800())	\
> +		if (proid_is_exynos5420() || proid_is_exynos5422())	\
>  			return EXYNOS5420_##base;		\
>  		return EXYNOS5_##base;				\
>  	}							\
> diff --git a/arch/arm/mach-exynos/include/mach/gpio.h b/arch/arm/mach-exynos/include/mach/gpio.h
> index 9699954..7fc8e61 100644
> --- a/arch/arm/mach-exynos/include/mach/gpio.h
> +++ b/arch/arm/mach-exynos/include/mach/gpio.h
> @@ -1398,7 +1398,7 @@ static struct gpio_info exynos5420_gpio_data[EXYNOS5420_GPIO_NUM_PARTS] = {
>  static inline struct gpio_info *get_gpio_data(void)
>  {
>  	if (cpu_is_exynos5()) {
> -		if (proid_is_exynos5420() || proid_is_exynos5800())
> +		if (proid_is_exynos5420() || proid_is_exynos5422())
>  			return exynos5420_gpio_data;
>  		else
>  			return exynos5_gpio_data;
> @@ -1415,7 +1415,7 @@ static inline struct gpio_info *get_gpio_data(void)
>  static inline unsigned int get_bank_num(void)
>  {
>  	if (cpu_is_exynos5()) {
> -		if (proid_is_exynos5420() || proid_is_exynos5800())
> +		if (proid_is_exynos5420() || proid_is_exynos5422())
>  			return EXYNOS5420_GPIO_NUM_PARTS;
>  		else
>  			return EXYNOS5_GPIO_NUM_PARTS;
> diff --git a/arch/arm/mach-exynos/pinmux.c b/arch/arm/mach-exynos/pinmux.c
> index 179b294..a556e4a 100644
> --- a/arch/arm/mach-exynos/pinmux.c
> +++ b/arch/arm/mach-exynos/pinmux.c
> @@ -858,7 +858,7 @@ static int exynos4x12_pinmux_config(int peripheral, int flags)
>  int exynos_pinmux_config(int peripheral, int flags)
>  {
>  	if (cpu_is_exynos5()) {
> -		if (proid_is_exynos5420() || proid_is_exynos5800())
> +		if (proid_is_exynos5420() || proid_is_exynos5422())
>  			return exynos5420_pinmux_config(peripheral, flags);
>  		else if (proid_is_exynos5250())
>  			return exynos5_pinmux_config(peripheral, flags);
> diff --git a/arch/arm/mach-exynos/power.c b/arch/arm/mach-exynos/power.c
> index 1b12051..cd2d661 100644
> --- a/arch/arm/mach-exynos/power.c
> +++ b/arch/arm/mach-exynos/power.c
> @@ -125,7 +125,7 @@ static void exynos5420_set_usbdev_phy_ctrl(unsigned int enable)
>  void set_usbdrd_phy_ctrl(unsigned int enable)
>  {
>  	if (cpu_is_exynos5()) {
> -		if (proid_is_exynos5420() || proid_is_exynos5800())
> +		if (proid_is_exynos5420() || proid_is_exynos5422())
>  			exynos5420_set_usbdev_phy_ctrl(enable);
>  		else
>  			exynos5_set_usbdrd_phy_ctrl(enable);
> 

  reply	other threads:[~2015-09-21 12:47 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28 13:59 [U-Boot] [PATCH 0/7] Add board detection for Odroid XU3 / XU3Lite / XU4 Przemyslaw Marczak
2015-08-28 13:59 ` [U-Boot] [PATCH 1/7] s5p: cpu_info: use defined CPU name if available Przemyslaw Marczak
2015-09-01  0:33   ` Simon Glass
2015-09-04 15:04     ` Przemyslaw Marczak
2015-08-28 13:59 ` [U-Boot] [PATCH 2/7] peach-pi: define CPU name for SoC Exynos5800 Przemyslaw Marczak
2015-08-28 13:59 ` [U-Boot] [PATCH 3/7] Exynos5422/5800: set cpu id to 0x5422 Przemyslaw Marczak
2015-09-01  0:33   ` Simon Glass
2015-08-28 13:59 ` [U-Boot] [PATCH 4/7] dm: pmic: add s2mps11 PMIC I/O driver Przemyslaw Marczak
2015-09-01  0:33   ` Simon Glass
2015-09-04 15:04     ` Przemyslaw Marczak
2015-09-07  0:11   ` Minkyu Kang
2015-09-09 10:31     ` Przemyslaw Marczak
2015-08-28 13:59 ` [U-Boot] [PATCH 5/7] odroid-xu3: enable s2mps11 PMIC support Przemyslaw Marczak
2015-09-01  0:33   ` Simon Glass
2015-08-28 13:59 ` [U-Boot] [PATCH 6/7] Exynos: add internal ADC driver Przemyslaw Marczak
2015-09-01  0:33   ` Simon Glass
2015-09-04 15:04     ` Przemyslaw Marczak
2015-08-28 13:59 ` [U-Boot] [PATCH 7/7] exynos5-dt: add board detection for Odroid XU3/XU3L/XU4 Przemyslaw Marczak
2015-09-01  0:33   ` Simon Glass
2015-09-04 15:04     ` Przemyslaw Marczak
2015-08-30 19:03 ` [U-Boot] [PATCH 0/7] Add board detection for Odroid XU3 / XU3Lite / XU4 Anand Moon
2015-08-31 12:17   ` Przemyslaw Marczak
2015-10-21  1:58   ` Siarhei Siamashka
2015-10-21  9:47     ` Anand Moon
2015-10-21  9:57     ` Anand Moon
2015-10-21 10:13       ` Przemyslaw Marczak
2015-08-31 13:22 ` Simon Glass
2015-08-31 18:29   ` Przemyslaw Marczak
2015-08-31 23:13     ` Simon Glass
2015-09-04 15:04       ` Przemyslaw Marczak
2015-09-21 12:26 ` [U-Boot] [PATCH V2 00/11] " Przemyslaw Marczak
2015-09-21 12:26   ` [U-Boot] [PATCH V2 01/11] samsung: board/misc: check returned pointer for get_board_type() calls Przemyslaw Marczak
2015-10-03 14:27     ` Simon Glass
2015-09-21 12:26   ` [U-Boot] [PATCH V2 02/11] s5p: cpu_info: print "cpu-model" if exists in dts Przemyslaw Marczak
2015-10-03 14:27     ` Simon Glass
2015-10-13 11:57       ` Przemyslaw Marczak
2015-09-21 12:26   ` [U-Boot] [PATCH V2 03/11] Peach-Pi: dts: add cpu-model string Przemyslaw Marczak
2015-10-03 14:28     ` Simon Glass
2015-10-13 11:57       ` Przemyslaw Marczak
2015-09-21 12:26   ` [U-Boot] [PATCH V2 04/11] Exynos5422/5800: set cpu id to 0x5422 Przemyslaw Marczak
2015-09-21 12:47     ` Jaehoon Chung [this message]
2015-09-21 13:01       ` Przemyslaw Marczak
2015-09-21 12:26   ` [U-Boot] [PATCH V2 05/11] dm: pmic: add s2mps11 PMIC I/O driver Przemyslaw Marczak
2015-10-03 14:28     ` Simon Glass
2015-10-13 11:57       ` Przemyslaw Marczak
2015-09-21 12:26   ` [U-Boot] [PATCH V2 06/11] dm: adc: add simple ADC uclass implementation Przemyslaw Marczak
2015-10-03 14:28     ` Simon Glass
2015-10-13 11:57       ` Przemyslaw Marczak
2015-09-21 12:26   ` [U-Boot] [PATCH V2 07/11] dm: adc: add Exynos54xx compatible ADC driver Przemyslaw Marczak
2015-10-03 14:28     ` Simon Glass
2015-10-13 11:58       ` Przemyslaw Marczak
2015-10-19  2:20         ` Simon Glass
2015-09-21 12:26   ` [U-Boot] [PATCH V2 08/11] Odroid-XU3: enable s2mps11 PMIC support Przemyslaw Marczak
2015-10-03 14:28     ` Simon Glass
2015-09-21 12:26   ` [U-Boot] [PATCH V2 09/11] Exynos54xx: dts: add ADC node Przemyslaw Marczak
2015-10-03 14:28     ` Simon Glass
2015-09-21 12:26   ` [U-Boot] [PATCH V2 10/11] Odroid-XU3: dts: enable ADC, with request for pre-reloc bind Przemyslaw Marczak
2015-10-03 14:28     ` Simon Glass
2015-09-21 12:26   ` [U-Boot] [PATCH V2 11/11] exynos5-dt-types: add board detection for Odroid XU3/XU3L/XU4 Przemyslaw Marczak
2015-10-03 14:28     ` Simon Glass
2015-10-13 11:59       ` Przemyslaw Marczak
2015-10-19  2:21         ` Simon Glass
2015-09-27 12:20   ` [U-Boot] [PATCH V2 00/11] Add board detection for Odroid XU3 / XU3Lite / XU4 Anand Moon
2015-09-28 10:19     ` Przemyslaw Marczak
2015-10-01 11:07   ` Przemyslaw Marczak
2015-10-03 14:30     ` Simon Glass
2015-10-13 11:59       ` Przemyslaw Marczak
2015-10-27 12:07   ` [U-Boot] [PATCH V3 00/14] " Przemyslaw Marczak
2015-10-27 12:07     ` [U-Boot] [PATCH V3 01/14] samsung: board/misc: check returned pointer for get_board_type() calls Przemyslaw Marczak
2015-10-28 18:50       ` Simon Glass
2015-10-30  3:00         ` Anand Moon
2015-10-27 12:07     ` [U-Boot] [PATCH V3 02/14] s5p: cpu_info: print "cpu-model" if exists in dts Przemyslaw Marczak
2015-10-28 18:50       ` Simon Glass
2015-10-30  3:01       ` Anand Moon
2015-10-27 12:07     ` [U-Boot] [PATCH V3 03/14] Peach-Pi: dts: add cpu-model string Przemyslaw Marczak
2015-10-28 18:50       ` Simon Glass
2015-10-30  3:02       ` Anand Moon
2015-10-27 12:07     ` [U-Boot] [PATCH V3 04/14] Exynos5422/5800: set cpu id to 0x5422 Przemyslaw Marczak
2015-10-30  3:03       ` Anand Moon
2015-10-27 12:07     ` [U-Boot] [PATCH V3 05/14] dm: pmic: add s2mps11 PMIC I/O driver Przemyslaw Marczak
2015-10-28 18:50       ` Simon Glass
2015-10-30  3:04       ` Anand Moon
2015-10-27 12:07     ` [U-Boot] [PATCH V3 06/14] dm: regulator: add function device_get_supply_regulator() Przemyslaw Marczak
2015-11-05 18:25       ` Simon Glass
2015-10-27 12:08     ` [U-Boot] [PATCH V3 07/14] dm: adc: add simple ADC uclass implementation Przemyslaw Marczak
2015-10-27 13:53       ` Przemyslaw Marczak
2015-11-05 18:25       ` Simon Glass
2015-10-27 12:08     ` [U-Boot] [PATCH V3 08/14] dm: adc: add Exynos54xx compatible ADC driver Przemyslaw Marczak
2015-11-06  0:15       ` Simon Glass
2015-10-27 12:08     ` [U-Boot] [PATCH V3 09/14] Odroid-XU3: enable s2mps11 PMIC support Przemyslaw Marczak
2015-10-30  3:09       ` Anand Moon
2015-10-27 12:08     ` [U-Boot] [PATCH V3 10/14] Exynos54xx: dts: add ADC node Przemyslaw Marczak
2015-10-28 18:50       ` Simon Glass
2015-10-29 13:58         ` Przemyslaw Marczak
2015-11-06  3:15           ` Simon Glass
2015-11-06  8:48             ` Przemyslaw Marczak
2015-10-27 12:08     ` [U-Boot] [PATCH V3 11/14] Odroid-XU3: dts: enable ADC, with request for pre-reloc bind Przemyslaw Marczak
2015-10-27 12:08     ` [U-Boot] [PATCH V3 12/14] exynos5-dt-types: add board detection for Odroid XU3/XU3L/XU4 Przemyslaw Marczak
2015-10-30  3:06       ` Anand Moon
2015-10-27 12:08     ` [U-Boot] [PATCH V3 13/14] sandbox: add ADC driver Przemyslaw Marczak
2015-11-04  9:52       ` [U-Boot] [PATCH] Add missing file: include/sandbox-adc.h Przemyslaw Marczak
2015-11-06 12:07         ` Simon Glass
2015-11-06  0:15       ` [U-Boot] [PATCH V3 13/14] sandbox: add ADC driver Simon Glass
2015-10-27 12:08     ` [U-Boot] [PATCH V3 14/14] sandbox: add ADC unit tests Przemyslaw Marczak
2015-11-06  0:15       ` Simon Glass
2015-11-02  5:37     ` [U-Boot] [PATCH V3 00/14] Add board detection for Odroid XU3 / XU3Lite / XU4 Minkyu Kang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55FFFC4E.6060109@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox