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. Signed-off-by: Alexander Varnin <fenixk19@xxxxxxx> --- arch/arm/plat-s3c24xx/irq.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index fe57bbb..bb36fc9 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c @@ -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); -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html