From: Kukjin Kim <kgene.kim@samsung.com>
To: 'Mark Brown' <broonie@opensource.wolfsonmicro.com>,
'Ben Dooks' <ben-linux@fluff.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
patches@opensource.wolfsonmicro.com
Subject: RE: [PATCH 3/3] ARM: S3C64XX: Use chip_data to store the shift for EINTs
Date: Wed, 01 Dec 2010 20:44:25 +0900 [thread overview]
Message-ID: <003101cb914d$1caf7040$560e50c0$%kim@samsung.com> (raw)
In-Reply-To: <1290698309-7691-3-git-send-email-broonie@opensource.wolfsonmicro.com>
Mark Brown wrote:
>
> This makes all the functions that use the shift slightly smaller, one
> instruction in most cases but more for ack() and maskack().
>
Hi Mark,
Uhm...I'm not sure to use chip_data for the eint_irq_to_bit() is best to us.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/mach-s3c64xx/irq-eint.c | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/irq-eint.c b/arch/arm/mach-s3c64xx/irq-
> eint.c
> index 169ee29..2ead818 100644
> --- a/arch/arm/mach-s3c64xx/irq-eint.c
> +++ b/arch/arm/mach-s3c64xx/irq-eint.c
> @@ -30,14 +30,14 @@
> #include <plat/pm.h>
>
> #define eint_offset(irq) ((irq) - IRQ_EINT(0))
> -#define eint_irq_to_bit(irq) (1 << eint_offset(irq))
> +#define eint_irq_to_bit(irq) ((u32)(1 << eint_offset(irq)))
>
> static inline void s3c_irq_eint_mask(struct irq_data *data)
> {
> u32 mask;
>
> mask = __raw_readl(S3C64XX_EINT0MASK);
> - mask |= eint_irq_to_bit(data->irq);
> + mask |= (u32)data->chip_data;
> __raw_writel(mask, S3C64XX_EINT0MASK);
> }
>
> @@ -46,13 +46,13 @@ static void s3c_irq_eint_unmask(struct irq_data *data)
> u32 mask;
>
> mask = __raw_readl(S3C64XX_EINT0MASK);
> - mask &= ~eint_irq_to_bit(data->irq);
> + mask &= ~((u32)data->chip_data);
> __raw_writel(mask, S3C64XX_EINT0MASK);
> }
>
> static inline void s3c_irq_eint_ack(struct irq_data *data)
> {
> - __raw_writel(eint_irq_to_bit(data->irq), S3C64XX_EINT0PEND);
> + __raw_writel((u32)data->chip_data, S3C64XX_EINT0PEND);
> }
>
> static void s3c_irq_eint_maskack(struct irq_data *data)
> @@ -198,6 +198,7 @@ static int __init s3c64xx_init_irq_eint(void)
>
> for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
> set_irq_chip(irq, &s3c_irq_eint);
> + set_irq_chip_data(irq, (void *)eint_irq_to_bit(irq));
> set_irq_handler(irq, handle_level_irq);
> set_irq_flags(irq, IRQF_VALID);
> }
> --
next prev parent reply other threads:[~2010-12-01 11:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-25 15:18 [PATCH 1/3] ARM: SAMSUNG: Convert s3c_irqext_wake() to new irq_ interrupt methods Mark Brown
2010-11-25 15:18 ` [PATCH 2/3] ARM: S3C64XX: Convert S3C64xx irq-eint to use new irq_ methods Mark Brown
2010-12-01 11:30 ` Kukjin Kim
2010-11-25 15:18 ` [PATCH 3/3] ARM: S3C64XX: Use chip_data to store the shift for EINTs Mark Brown
2010-12-01 11:44 ` Kukjin Kim [this message]
2010-12-01 11:55 ` Mark Brown
2010-12-01 12:11 ` Kukjin Kim
2010-12-08 0:36 ` Ben Dooks
2010-12-01 10:19 ` [PATCH 1/3] ARM: SAMSUNG: Convert s3c_irqext_wake() to new irq_ interrupt methods Lennert Buytenhek
2010-12-01 11:08 ` Mark Brown
2010-12-01 11:45 ` Lennert Buytenhek
2010-12-01 11:47 ` Mark Brown
2010-12-01 11:24 ` Kukjin Kim
2010-12-01 11:28 ` Kukjin Kim
2010-12-01 11:33 ` Mark Brown
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='003101cb914d$1caf7040$560e50c0$%kim@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=ben-linux@fluff.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
/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