ARM: S3C2443: introduce soc_is_s3c2443 macro
Subsystems (3)
PATCH 1/2 ARM: S3C2443: introduce soc_is_s3c2443 macro
--- arch/arm/plat-samsung/include/plat/cpu.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/include/plat/cpu.h +10 -0
@@ -23,6 +23,9 @@ extern unsigned long samsung_cpu_id;#define S3C24XX_CPU_ID 0x32400000#define S3C24XX_CPU_MASK 0xFFF00000 +#define S3C2443_CPU_ID 0x32443001 +#define S3C2443_CPU_MASK 0xFFFFFFFF +#define S3C6400_CPU_ID 0x36400000#define S3C6410_CPU_ID 0x36410000#define S3C64XX_CPU_MASK 0xFFFFF000
@@ -52,6 +55,7 @@ static inline int is_samsung_##name(void) \ } IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK) +IS_SAMSUNG_CPU(s3c2443, S3C2443_CPU_ID, S3C2443_CPU_MASK) IS_SAMSUNG_CPU(s3c6400, S3C6400_CPU_ID, S3C64XX_CPU_MASK) IS_SAMSUNG_CPU(s3c6410, S3C6410_CPU_ID, S3C64XX_CPU_MASK)IS_SAMSUNG_CPU (s5p6440,S5P6440_CPU_ID ,S5P64XX_CPU_MASK )
@@ -72,6 +76,12 @@ IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)# define soc_is_s3c24xx () 0#endif +#if defined(CONFIG_CPU_S3C2443 ) +# define soc_is_s3c2443 () is_samsung_s3c2443() +#else +# define soc_is_s3c2443 () 0 +#endif +#if defined(CONFIG_CPU_S3C6400 ) || defined(CONFIG_CPU_S3C6410 )# define soc_is_s3c64xx () (is_samsung_s3c6400() || is_samsung_s3c6410())#else
Signature · 1 line
1.7.2.5
PATCH 2/2 ARM: S3C2443: Workaround for 2443 EXTINT error
S3C2443 CPU has a problem with incorrect reading from EXTINTn registers. So s3c_irqext_type function wrongly modifies them. So add special check to s3c_irqext_type, to handle this case.
--- arch/arm/plat-s3c24xx/irq.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
arch/arm/plat-s3c24xx/irq.c +15 -0
@@ -219,6 +219,21 @@ s3c_irqext_type(struct irq_data *data, unsigned int type) } value =__raw_readl (extint_reg); + +if ( (samsung_cpu_id &0xfffff ) ==0x43001 )//Hack for 2443 error workaround + { +int i; +int fixed =0 ; +if (extint_reg ==S3C24XX_EXTINT1 || extint_reg ==S3C24XX_EXTINT2 ) +for (i=0 ; i<7 ;i++) + fixed |= (((value >> ((7 -i)*4 +1 )) &7 ) | ((value >> ((7 -i)*4 -3 )) &8 )) << i*4 ; +else +for (i=0 ; i<7 ;i++) + fixed |= ( (value >> (7 -i)*4 ) &0xf ) << i*4 ; + fixed |= (((value>>1 ) &7 ) | ((value<<3 ) &8 )) <<27 ; + value = fixed; + } + value = (value & ~(7 << extint_offset)) | (newvalue << extint_offset);__raw_writel (value, extint_reg);
Signature · 1 line
1.7.2.5
Re: [PATCH 2/2] ARM: S3C2443: Workaround for 2443 EXTINT error
Sorry, an old version.
26.11.2012 12:40, Alexander Varnin пишет:
Quoted 35 lines
S3C2443 CPU has a problem with incorrect reading from EXTINTn registers. So
s3c_irqext_typefunction wrongly modifies them. So add special check tos3c_irqext_type, to handle this case.Signed-off-by Alexander Varnin <[email protected]>--- arch/arm/plat-s3c24xx/irq.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)arch/arm/plat-s3c24xx/irq.c +15
-0@@ -219,6 +219,21 @@ s3c_irqext_type(struct irq_data *data, unsigned int type) } value =__raw_readl (extint_reg); + +if ( (samsung_cpu_id &0xfffff ) ==0x43001 )//Hack for 2443 error workaround + { +int i; +int fixed =0 ; +if (extint_reg ==S3C24XX_EXTINT1 || extint_reg ==S3C24XX_EXTINT2 ) +for (i=0 ; i<7 ;i++) + fixed |= (((value >> ((7 -i)*4 +1 )) &7 ) | ((value >> ((7 -i)*4 -3 )) &8 )) << i*4 ; +else +for (i=0 ; i<7 ;i++) + fixed |= ( (value >> (7 -i)*4 ) &0xf ) << i*4 ; + fixed |= (((value>>1 ) &7 ) | ((value<<3 ) &8 )) <<27 ; + value = fixed; + } + value = (value & ~(7 << extint_offset)) | (newvalue << extint_offset);__raw_writel (value, extint_reg);
Am Montag, 26. November 2012, 09:40:02 schrieb Alexander Varnin:
Quoted 1 line
Signed-off-by Alexander Varnin <[email protected]>
Quoted 39 lines
--- arch/arm/plat-samsung/include/plat/cpu.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/arch/arm/plat-samsung/include/plat/cpu.hindex ace4451..613f492 100644arch/arm/plat-samsung/include/plat/cpu.h +4
-0@@ -23,6 +23,9 @@ extern unsigned long samsung_cpu_id;#define S3C24XX_CPU_ID 0x32400000#define S3C24XX_CPU_MASK 0xFFF00000 +#define S3C2443_CPU_ID 0x32443001 +#define S3C2443_CPU_MASK 0xFFFFFFFF +#define S3C6400_CPU_ID 0x36400000#define S3C6410_CPU_ID 0x36410000#define S3C64XX_CPU_MASK 0xFFFFF000@@ -52,6 +55,7 @@ static inline int is_samsung_##name(void) \ } IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK) +IS_SAMSUNG_CPU(s3c2443, S3C2443_CPU_ID, S3C2443_CPU_MASK) IS_SAMSUNG_CPU(s3c6400, S3C6400_CPU_ID, S3C64XX_CPU_MASK) IS_SAMSUNG_CPU(s3c6410, S3C6410_CPU_ID, S3C64XX_CPU_MASK)IS_SAMSUNG_CPU (s5p6440,S5P6440_CPU_ID ,S5P64XX_CPU_MASK )@@ -72,6 +76,12 @@ IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID,
EXYNOS5_SOC_MASK) # definesoc_is_s3c24xx()0
#endifarch/arm/plat-samsung/include/plat/cpu.h +6
-0+#if defined(CONFIG_CPU_S3C2443 ) +# define soc_is_s3c2443 () is_samsung_s3c2443() +#else +# define soc_is_s3c2443 () 0 +#endif +#if defined(CONFIG_CPU_S3C6400 ) || defined(CONFIG_CPU_S3C6410 )# define soc_is_s3c64xx () (is_samsung_s3c6400() || is_samsung_s3c6410())#else