diff mbox

[U-Boot,V2,1/8] arm:exynos: add cpu revision

Message ID 1390402477-24340-2-git-send-email-p.wilczek@samsung.com
State Accepted
Delegated to: Minkyu Kang
Headers show

Commit Message

Piotr Wilczek Jan. 22, 2014, 2:54 p.m. UTC
This patch enables to read cpu revision on Exynos CPU.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
Changes for V2:
 - none

 arch/arm/include/asm/arch-exynos/cpu.h |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Wolfgang Denk Jan. 23, 2014, 10:28 a.m. UTC | #1
Dear Piotr Wilczek,

In message <1390402477-24340-2-git-send-email-p.wilczek@samsung.com> you wrote:
> This patch enables to read cpu revision on Exynos CPU.

Sorry,  you really need to refactor your patches.

In this commit you add references to "s5p_cpu_id":

> @@ -196,10 +198,12 @@ static inline void s5p_set_cpu_id(void)
>  	case 0x210:
>  		/* Exynos4210 EVT1 */
>  		s5p_cpu_id = 0x4210;
> +		s5p_cpu_rev = cpu_rev;
>  		break;
>  	case 0x412:
>  		/* Exynos4412 */
>  		s5p_cpu_id = 0x4412;
> +		s5p_cpu_rev = cpu_rev;
>  		break;
>  	case 0x520:
>  		/* Exynos5250 */

But this variable does not exist anywhere.  It is only added in the
next patch.  Adding this patch causes build breakage, i. e. your patch
series is not bisectable.

Please fix!

Best regards,

Wolfgang Denk
Minkyu Kang Feb. 3, 2014, 8:18 a.m. UTC | #2
Dear Wolfgang Denk,

On 23/01/14 19:28, Wolfgang Denk wrote:
> Dear Piotr Wilczek,
> 
> In message <1390402477-24340-2-git-send-email-p.wilczek@samsung.com> you wrote:
>> This patch enables to read cpu revision on Exynos CPU.
> 
> Sorry,  you really need to refactor your patches.
> 
> In this commit you add references to "s5p_cpu_id":
> 
>> @@ -196,10 +198,12 @@ static inline void s5p_set_cpu_id(void)
>>  	case 0x210:
>>  		/* Exynos4210 EVT1 */
>>  		s5p_cpu_id = 0x4210;
>> +		s5p_cpu_rev = cpu_rev;
>>  		break;
>>  	case 0x412:
>>  		/* Exynos4412 */
>>  		s5p_cpu_id = 0x4412;
>> +		s5p_cpu_rev = cpu_rev;
>>  		break;
>>  	case 0x520:
>>  		/* Exynos5250 */
> 
> But this variable does not exist anywhere.  It is only added in the
> next patch.  Adding this patch causes build breakage, i. e. your patch
> series is not bisectable.

s5p_cpu_id and s5p_cpu_rev exist on "arch/arm/cpu/armv7/s5p-common/cpu_info.c".
This patch looks fine to me.

Thanks,
Minkyu Kang.
diff mbox

Patch

diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h
index 573f755..bccce63 100644
--- a/arch/arm/include/asm/arch-exynos/cpu.h
+++ b/arch/arm/include/asm/arch-exynos/cpu.h
@@ -185,9 +185,11 @@  static inline int s5p_get_cpu_rev(void)
 
 static inline void s5p_set_cpu_id(void)
 {
-	unsigned int pro_id = (readl(EXYNOS4_PRO_ID) & 0x00FFF000) >> 12;
+	unsigned int pro_id = readl(EXYNOS4_PRO_ID);
+	unsigned int cpu_id = (pro_id & 0x00FFF000) >> 12;
+	unsigned int cpu_rev = pro_id & 0x000000FF;
 
-	switch (pro_id) {
+	switch (cpu_id) {
 	case 0x200:
 		/* Exynos4210 EVT0 */
 		s5p_cpu_id = 0x4210;
@@ -196,10 +198,12 @@  static inline void s5p_set_cpu_id(void)
 	case 0x210:
 		/* Exynos4210 EVT1 */
 		s5p_cpu_id = 0x4210;
+		s5p_cpu_rev = cpu_rev;
 		break;
 	case 0x412:
 		/* Exynos4412 */
 		s5p_cpu_id = 0x4412;
+		s5p_cpu_rev = cpu_rev;
 		break;
 	case 0x520:
 		/* Exynos5250 */