From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: Juha Yrjola <juha.yrjola@solidboot.com>,
Tony Lindgren <tony@atomide.com>
Subject: [PATCH 4/18] ARM: OMAP: Optimize INTC register accesses and enable autoidling
Date: Mon, 9 Apr 2007 17:30:47 -0400 [thread overview]
Message-ID: <11761542731458-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <11761542712251-git-send-email-tony@atomide.com>
From: Juha Yrjola <juha.yrjola@solidboot.com>
Use virtual addresses directly instead of physical addresses to
avoid having to recalculate the virtual address with every
register access.
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/irq.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -37,7 +37,7 @@ static struct omap_irq_bank {
} __attribute__ ((aligned(4))) irq_banks[] = {
{
/* MPU INTC */
- .base_reg = OMAP24XX_IC_BASE,
+ .base_reg = IO_ADDRESS(OMAP24XX_IC_BASE),
.nr_irqs = 96,
}, {
/* XXX: DSP INTC */
@@ -47,7 +47,7 @@ static struct omap_irq_bank {
/* XXX: FIQ and additional INTC support (only MPU at the moment) */
static void omap_ack_irq(unsigned int irq)
{
- omap_writel(0x1, irq_banks[0].base_reg + INTC_CONTROL);
+ __raw_writel(0x1, irq_banks[0].base_reg + INTC_CONTROL);
}
static void omap_mask_irq(unsigned int irq)
@@ -60,7 +60,7 @@ static void omap_mask_irq(unsigned int irq)
irq %= 32;
}
- omap_writel(1 << irq, irq_banks[0].base_reg + INTC_MIR_SET0 + offset);
+ __raw_writel(1 << irq, irq_banks[0].base_reg + INTC_MIR_SET0 + offset);
}
static void omap_unmask_irq(unsigned int irq)
@@ -73,7 +73,7 @@ static void omap_unmask_irq(unsigned int irq)
irq %= 32;
}
- omap_writel(1 << irq, irq_banks[0].base_reg + INTC_MIR_CLEAR0 + offset);
+ __raw_writel(1 << irq, irq_banks[0].base_reg + INTC_MIR_CLEAR0 + offset);
}
static void omap_mask_ack_irq(unsigned int irq)
@@ -93,17 +93,20 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
{
unsigned long tmp;
- tmp = omap_readl(bank->base_reg + INTC_REVISION) & 0xff;
+ tmp = __raw_readl(bank->base_reg + INTC_REVISION) & 0xff;
printk(KERN_INFO "IRQ: Found an INTC at 0x%08lx "
"(revision %ld.%ld) with %d interrupts\n",
bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
- tmp = omap_readl(bank->base_reg + INTC_SYSCONFIG);
+ tmp = __raw_readl(bank->base_reg + INTC_SYSCONFIG);
tmp |= 1 << 1; /* soft reset */
- omap_writel(tmp, bank->base_reg + INTC_SYSCONFIG);
+ __raw_writel(tmp, bank->base_reg + INTC_SYSCONFIG);
- while (!(omap_readl(bank->base_reg + INTC_SYSSTATUS) & 0x1))
+ while (!(__raw_readl(bank->base_reg + INTC_SYSSTATUS) & 0x1))
/* Wait for reset to complete */;
+
+ /* Enable autoidle */
+ __raw_writel(1 << 0, bank->base_reg + INTC_SYSCONFIG);
}
void __init omap_init_irq(void)
--
1.4.4.2
next prev parent reply other threads:[~2007-04-09 21:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-09 21:30 [PATCH 0/18] ARM: OMAP: Updates for OMAP2 common code Tony Lindgren
2007-04-09 21:30 ` [PATCH 1/18] ARM: OMAP2: Place SMS and SDRC into smart idle mode Tony Lindgren
2007-04-09 21:30 ` [PATCH 2/18] ARM: OMAP2: Force APLLs always active Tony Lindgren
2007-04-09 21:30 ` [PATCH 3/18] ARM: OMAP: Enable serial idling and wakeup features Tony Lindgren
2007-04-09 21:30 ` Tony Lindgren [this message]
2007-04-09 21:30 ` [PATCH 5/18] ARM: OMAP: Board Apollon update, fix boot Tony Lindgren
2007-04-09 21:30 ` [PATCH 6/18] ARM: OMAP: omap2/memory.c compile fixes Tony Lindgren
2007-04-09 21:30 ` [PATCH 7/18] ARM: OMAP: 24xx pinmux updates Tony Lindgren
2007-04-09 21:30 ` [PATCH 8/18] ARM: OMAP: omap2/gpmc updates Tony Lindgren
2007-04-09 21:30 ` [PATCH 9/18] ARM: OMAP: abstract debug card setup (smc, leds) Tony Lindgren
2007-04-09 21:30 ` [PATCH 10/18] ARM: OMAP: Add minimal OMAP2430 support Tony Lindgren
2007-04-09 21:30 ` [PATCH 11/18] ARM: OMAP: Tabify mux.c Tony Lindgren
2007-04-09 21:30 ` [PATCH 12/18] ARM: OMAP: TUSB EVM init Tony Lindgren
2007-04-09 21:30 ` [PATCH 13/18] ARM: OMAP: Merge gpmc changes from N800 tree Tony Lindgren
2007-04-09 21:30 ` [PATCH 14/18] ARM: OMAP: Merge driver headers " Tony Lindgren
2007-04-09 21:30 ` [PATCH 15/18] ARM: OMAP: Merge PM code " Tony Lindgren
2007-04-09 21:30 ` [PATCH 16/18] ARM: OMAP: 243x: Add mappings for SDRC and SMS Tony Lindgren
2007-04-09 21:31 ` [PATCH 17/18] ARM: OMAP: Device init for OMAP24xx Enhanced Audio Controller Tony Lindgren
2007-04-09 21:31 ` [PATCH 18/18] ARM: OMAP: Fix PRCM base register usage for 243x Tony Lindgren
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=11761542731458-git-send-email-tony@atomide.com \
--to=tony@atomide.com \
--cc=juha.yrjola@solidboot.com \
--cc=linux-kernel@vger.kernel.org \
/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