drivers:power:exynos-tmu: add support for Exynos5260
Subsystems (2)
PATCH 1/1 drivers:power:exynos-tmu: add support for Exynos5260
This patch adds support for TMU on Exynos5260 Register bit fields are little different from the previous versions.
--- arch/arm/include/asm/arch-exynos/tmu.h | 11 +++++++++++ drivers/power/exynos-tmu.c | 25 +++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-exynos/tmu.h +11 -0
@@ -26,7 +26,11 @@ struct exynos5_tmu_reg {u32 triminfo_control;u32 rsvd5[2 ];u32 tmu_control; +#ifdef CONFIG_EXYNOS5260 +u32 tmu_control1; +#else u32 rsvd7; +#endif u32 tmu_status;u32 sampling_internal;u32 counter_value0;
@@ -41,10 +45,17 @@ struct exynos5_tmu_reg {u32 past_temp7_4;u32 past_temp11_8;u32 past_temp15_12; +#ifdef CONFIG_EXYNOS5260 +u32 rsvd15[16 ]; +#endif u32 inten;u32 intstat;u32 intclear; +#ifdef CONFIG_EXYNOS5260 +u32 rsvd31[17 ]; +#else u32 rsvd15; +#endif u32 emul_con; };#endif /* __ASM_ARCH_TMU_H */
drivers/power/exynos-tmu.c +23 -2
@@ -31,7 +31,13 @@#define INTEN_RISE0 1#define INTEN_RISE1 (1 << 4)#define INTEN_RISE2 (1 << 8) + +#ifdef CONFIG_EXYNOS5250 +#define INTEN_FALL0 (1 << 12) +#else #define INTEN_FALL0 (1 << 16) +#endif +#define INTEN_FALL1 (1 << 20)#define INTEN_FALL2 (1 << 24)
@@ -43,9 +49,24 @@#define INTCLEAR_FALL0 (1 << 16)#define INTCLEAR_FALL1 (1 << 20)#define INTCLEAR_FALL2 (1 << 24) + +#ifdef CONFIG_EXYNOS5260 +#define INTEN_RISE3 (1 << 12) +#define INTEN_FALL3 (1 << 28) +#define INTCLEAR_RISE3 (1 << 12) +#define INTCLEAR_FALL3 (1 << 28) +#endif + +#if defined(INTCLEAR_RISE3 ) && defined(INTCLEAR_FALL3 )#define INTCLEARALL (INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ - INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ - INTCLEAR_FALL1 | INTCLEAR_FALL2) + INTCLEAR_RISE2 | INTCLEAR_RISE3 | \ + INTCLEAR_FALL0 | INTCLEAR_FALL1 | \ + INTCLEAR_FALL2 | INTCLEAR_FALL3) +#else +#define INTCLEARALL (INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ + INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ + INTCLEAR_FALL1 | INTCLEAR_FALL2) +#endif /* Tmeperature threshold values for various thermal events */ struct temperature_params {
Signature · 1 line
1.7.10.4
PATCH 1/1 drivers:power:exynos-tmu: add support for Exynos5260
Dear Naveen Krishna Chatradhi,
Quoted 5 lines · Naveen Krishna Chatradhi
This patch adds support for TMU on Exynos5260 Register bit fields are little different from the previous versions.
Change-Id: Ibe835abe9cb255d2f8375c8e9e32d32cff19c093
please remove it.
Quoted 76 lines
Signed-off-by Naveen Krishna Chatradhi <[email protected]>--- arch/arm/include/asm/arch-exynos/tmu.h | 11 +++++++++++ drivers/power/exynos-tmu.c | 25 +++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-)arch/arm/include/asm/arch-exynos/tmu.h +11
-0@@ -26,7 +26,11 @@ struct exynos5_tmu_reg {u32 triminfo_control;u32 rsvd5[2 ];u32 tmu_control; +#ifdef CONFIG_EXYNOS5260 +u32 tmu_control1; +#else u32 rsvd7; +#endif u32 tmu_status;u32 sampling_internal;u32 counter_value0;@@ -41,10 +45,17 @@ struct exynos5_tmu_reg {u32 past_temp7_4;u32 past_temp11_8;u32 past_temp15_12; +#ifdef CONFIG_EXYNOS5260 +u32 rsvd15[16 ]; +#endif u32 inten;u32 intstat;u32 intclear; +#ifdef CONFIG_EXYNOS5260 +u32 rsvd31[17 ]; +#else u32 rsvd15; +#endif u32 emul_con; };#endif /* __ASM_ARCH_TMU_H */ drivers/power/exynos-tmu.c +16
-2@@ -31,7 +31,13 @@#define INTEN_RISE0 1#define INTEN_RISE1 (1 << 4)#define INTEN_RISE2 (1 << 8) + +#ifdef CONFIG_EXYNOS5250 +#define INTEN_FALL0 (1 << 12) +#else #define INTEN_FALL0 (1 << 16) +#endif +#define INTEN_FALL1 (1 << 20)#define INTEN_FALL2 (1 << 24)@@ -43,9 +49,24 @@#define INTCLEAR_FALL0 (1 << 16)#define INTCLEAR_FALL1 (1 << 20)#define INTCLEAR_FALL2 (1 << 24) + +#ifdef CONFIG_EXYNOS5260 +#define INTEN_RISE3 (1 << 12) +#define INTEN_FALL3 (1 << 28) +#define INTCLEAR_RISE3 (1 << 12) +#define INTCLEAR_FALL3 (1 << 28) +#endif + +#if defined(INTCLEAR_RISE3 ) && defined(INTCLEAR_FALL3 )#define INTCLEARALL (INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ - INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ - INTCLEAR_FALL1 | INTCLEAR_FALL2) + INTCLEAR_RISE2 | INTCLEAR_RISE3 | \
drivers/power/exynos-tmu.c line 72
Quoted 10 lines
drivers/power/exynos-tmu.c +7
-0+ INTCLEAR_FALL0 | INTCLEAR_FALL1 | \ + INTCLEAR_FALL2 | INTCLEAR_FALL3) +#else +#define INTCLEARALL (INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ + INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ + INTCLEAR_FALL1 | INTCLEAR_FALL2) +#endif /* Tmeperature threshold values for various thermal events */ struct temperature_params {
I recommended that don't use ifdefs.
And if you want to support exynos5260 then please post full features and board file.
Thanks,
Minkyu Kang.
PATCH 1/1 drivers:power:exynos-tmu: add support for Exynos5260
Hello Minkyu,
Quoted 94 lines · Minkyu Kang
Dear Naveen Krishna Chatradhi,
Quoted 5 lines · Naveen Krishna Chatradhi
This patch adds support for TMU on Exynos5260 Register bit fields are little different from the previous versions.
Change-Id: Ibe835abe9cb255d2f8375c8e9e32d32cff19c093
please remove it.
Quoted 83 lines
Signed-off-by Naveen Krishna Chatradhi <[email protected]>--- arch/arm/include/asm/arch-exynos/tmu.h | 11 +++++++++++ drivers/power/exynos-tmu.c | 25 +++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-)arch/arm/include/asm/arch-exynos/tmu.h +11
-0@@ -26,7 +26,11 @@ struct exynos5_tmu_reg {u32 triminfo_control;u32 rsvd5[2 ];u32 tmu_control; +#ifdef CONFIG_EXYNOS5260 +u32 tmu_control1; +#else u32 rsvd7; +#endif u32 tmu_status;u32 sampling_internal;u32 counter_value0;@@ -41,10 +45,17 @@ struct exynos5_tmu_reg {u32 past_temp7_4;u32 past_temp11_8;u32 past_temp15_12; +#ifdef CONFIG_EXYNOS5260 +u32 rsvd15[16 ]; +#endif u32 inten;u32 intstat;u32 intclear; +#ifdef CONFIG_EXYNOS5260 +u32 rsvd31[17 ]; +#else u32 rsvd15; +#endif u32 emul_con; };#endif /* __ASM_ARCH_TMU_H */ drivers/power/exynos-tmu.c +23
-2@@ -31,7 +31,13 @@#define INTEN_RISE0 1#define INTEN_RISE1 (1 << 4)#define INTEN_RISE2 (1 << 8) + +#ifdef CONFIG_EXYNOS5250 +#define INTEN_FALL0 (1 << 12) +#else #define INTEN_FALL0 (1 << 16) +#endif +#define INTEN_FALL1 (1 << 20)#define INTEN_FALL2 (1 << 24)@@ -43,9 +49,24 @@#define INTCLEAR_FALL0 (1 << 16)#define INTCLEAR_FALL1 (1 << 20)#define INTCLEAR_FALL2 (1 << 24) + +#ifdef CONFIG_EXYNOS5260 +#define INTEN_RISE3 (1 << 12) +#define INTEN_FALL3 (1 << 28) +#define INTCLEAR_RISE3 (1 << 12) +#define INTCLEAR_FALL3 (1 << 28) +#endif + +#if defined(INTCLEAR_RISE3 ) && defined(INTCLEAR_FALL3 )#define INTCLEARALL (INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ - INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ - INTCLEAR_FALL1 | INTCLEAR_FALL2) + INTCLEAR_RISE2 | INTCLEAR_RISE3 | \ + INTCLEAR_FALL0 | INTCLEAR_FALL1 | \ + INTCLEAR_FALL2 | INTCLEAR_FALL3) +#else +#define INTCLEARALL (INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ + INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ + INTCLEAR_FALL1 | INTCLEAR_FALL2) +#endif
Quoted 5 lines
drivers/power/exynos-tmu.c line 72
Quoted 3 lines
drivers/power/exynos-tmu.c +0
-0/* Tmeperature threshold values for various thermal events */ struct temperature_params {I recommended that don't use ifdefs.
Few register bits and offsets are different between Exynso5260 version of TMU and
previous versions.
Heiko suggested using Ifdefs in I2C driver code if needed.
http://www.mail-archive.com/u-boot at lists.denx.de/msg122689.html
I can use devicetree to pass on that information. But, changes are comparatively more than the actual differences.
Quoted 1 line
And if you want to support exynos5260 then please post full features and board file.
Board file, DTSI files and other arch code for Exynos5260 is on its way.
Quoted 3 lines
Thanks,
Minkyu Kang.
Signature · 2 lines
Shine bright, (: Nav :)
PATCH 1/1 drivers:power:exynos-tmu: add support for Exynos5260
Quoted 102 lines · Naveen Krishna Ch
Hello Minkyu,
Quoted 94 lines · Minkyu Kang
Dear Naveen Krishna Chatradhi,
Quoted 5 lines · Naveen Krishna Chatradhi
This patch adds support for TMU on Exynos5260 Register bit fields are little different from the previous versions.
Change-Id: Ibe835abe9cb255d2f8375c8e9e32d32cff19c093
please remove it.
Quoted 83 lines
Signed-off-by Naveen Krishna Chatradhi <[email protected]>--- arch/arm/include/asm/arch-exynos/tmu.h | 11 +++++++++++ drivers/power/exynos-tmu.c | 25 +++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-)arch/arm/include/asm/arch-exynos/tmu.h +11
-0@@ -26,7 +26,11 @@ struct exynos5_tmu_reg {u32 triminfo_control;u32 rsvd5[2 ];u32 tmu_control; +#ifdef CONFIG_EXYNOS5260 +u32 tmu_control1; +#else u32 rsvd7; +#endif u32 tmu_status;u32 sampling_internal;u32 counter_value0;@@ -41,10 +45,17 @@ struct exynos5_tmu_reg {u32 past_temp7_4;u32 past_temp11_8;u32 past_temp15_12; +#ifdef CONFIG_EXYNOS5260 +u32 rsvd15[16 ]; +#endif u32 inten;u32 intstat;u32 intclear; +#ifdef CONFIG_EXYNOS5260 +u32 rsvd31[17 ]; +#else u32 rsvd15; +#endif u32 emul_con; };#endif /* __ASM_ARCH_TMU_H */ drivers/power/exynos-tmu.c +23
-2@@ -31,7 +31,13 @@#define INTEN_RISE0 1#define INTEN_RISE1 (1 << 4)#define INTEN_RISE2 (1 << 8) + +#ifdef CONFIG_EXYNOS5250 +#define INTEN_FALL0 (1 << 12) +#else #define INTEN_FALL0 (1 << 16) +#endif +#define INTEN_FALL1 (1 << 20)#define INTEN_FALL2 (1 << 24)@@ -43,9 +49,24 @@#define INTCLEAR_FALL0 (1 << 16)#define INTCLEAR_FALL1 (1 << 20)#define INTCLEAR_FALL2 (1 << 24) + +#ifdef CONFIG_EXYNOS5260 +#define INTEN_RISE3 (1 << 12) +#define INTEN_FALL3 (1 << 28) +#define INTCLEAR_RISE3 (1 << 12) +#define INTCLEAR_FALL3 (1 << 28) +#endif + +#if defined(INTCLEAR_RISE3 ) && defined(INTCLEAR_FALL3 )#define INTCLEARALL (INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ - INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ - INTCLEAR_FALL1 | INTCLEAR_FALL2) + INTCLEAR_RISE2 | INTCLEAR_RISE3 | \ + INTCLEAR_FALL0 | INTCLEAR_FALL1 | \ + INTCLEAR_FALL2 | INTCLEAR_FALL3) +#else +#define INTCLEARALL (INTCLEAR_RISE0 | INTCLEAR_RISE1 | \ + INTCLEAR_RISE2 | INTCLEAR_FALL0 | \ + INTCLEAR_FALL1 | INTCLEAR_FALL2) +#endif Quoted 5 lines
drivers/power/exynos-tmu.c line 72
Quoted 3 lines
drivers/power/exynos-tmu.c +0
-0/* Tmeperature threshold values for various thermal events */ struct temperature_params {I recommended that don't use ifdefs.
Quoted 6 lines
Few register bits and offsets are different between Exynso5260 version of TMU and
previous versions.Heiko suggested using Ifdefs in I2C driver code if needed.
http://www.mail-archive.com/u-boot at lists.denx.de/msg122689.html
On I2C driver side? I don't care.
On Exynos side? no.
Quoted 6 lines
I can use devicetree to pass on that information. But, changes are comparatively more than the actual differences.
Quoted 1 line
And if you want to support exynos5260 then please post full features and board file.
Board file, DTSI files and other arch code for Exynos5260 is on its way.
please post them together.
Quoted 4 lines
Quoted 3 lines
Thanks,
Minkyu Kang.
Thanks,
Minkyu Kang.