Skip to content

Commit

Permalink
Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm
Browse files Browse the repository at this point in the history
* 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm: (161 commits)
  ARM: pxa: fix building issue of missing physmap.h
  ARM: mmp: PXA910 drive strength FAST using wrong value
  ARM: mmp: MMP2 drive strength FAST using wrong value
  ARM: pxa: fix recursive calls in pxa_low_gpio_chip
  AT91: Support for gsia18s board
  AT91: Acme Systems FOX Board G20 board files
  AT91: board-sam9m10g45ek.c: Remove duplicate inclusion of mach/hardware.h
  ARM: pxa: fix suspend/resume array index miscalculation
  ARM: pxa: use cpu_has_ipr() consistently in irq.c
  ARM: pxa: remove unused variable in clock-pxa3xx.c
  ARM: pxa: fix warning in zeus.c
  ARM: sa1111: fix typo in sa1111_retrigger_lowirq()
  ARM mxs: clkdev related compile fixes
  ARM i.MX mx31_3ds: Fix MC13783 regulator names
  ARM: plat-stmp3xxx: irq_data conversion.
  ARM: plat-spear: irq_data conversion.
  ARM: plat-orion: irq_data conversion.
  ARM: plat-omap: irq_data conversion.
  ARM: plat-nomadik: irq_data conversion.
  ARM: plat-mxc: irq_data conversion.
  ...

Fix up trivial conflict in arch/arm/plat-omap/gpio.c (Lennert
Buytenhek's irq_data conversion clashing with some omap irq updates)
  • Loading branch information
torvalds committed Jan 15, 2011
2 parents 65e5d00 + bbba756 commit 16c1020
Show file tree
Hide file tree
Showing 250 changed files with 6,535 additions and 2,398 deletions.
21 changes: 4 additions & 17 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ config ARM
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7))
select HAVE_C_RECORDMCOUNT
select HAVE_GENERIC_HARDIRQS
select HAVE_SPARSE_IRQ
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
Expand Down Expand Up @@ -97,10 +99,6 @@ config MCA
<file:Documentation/mca.txt> (and especially the web page given
there) before attempting to build an MCA bus kernel.

config GENERIC_HARDIRQS
bool
default y

config STACKTRACE_SUPPORT
bool
default y
Expand Down Expand Up @@ -180,9 +178,6 @@ config FIQ
config ARCH_MTD_XIP
bool

config GENERIC_HARDIRQS_NO__DO_IRQ
def_bool y

config ARM_L1_CACHE_SHIFT_6
bool
help
Expand Down Expand Up @@ -368,7 +363,7 @@ config ARCH_MXS
bool "Freescale MXS-based"
select GENERIC_CLOCKEVENTS
select ARCH_REQUIRE_GPIOLIB
select COMMON_CLKDEV
select CLKDEV_LOOKUP
help
Support for Freescale MXS-based family of processors

Expand Down Expand Up @@ -771,6 +766,7 @@ config ARCH_S5PV310
select ARCH_SPARSEMEM_ENABLE
select GENERIC_GPIO
select HAVE_CLK
select ARCH_HAS_CPUFREQ
select GENERIC_CLOCKEVENTS
select HAVE_S3C_RTC if RTC_CLASS
select HAVE_S3C2410_I2C if I2C
Expand Down Expand Up @@ -1452,15 +1448,6 @@ config HW_PERF_EVENTS
Enable hardware performance counter support for perf events. If
disabled, perf events will use software events only.

config SPARSE_IRQ
def_bool n
help
This enables support for sparse irqs. This is useful in general
as most CPUs have a fairly sparse array of IRQ vectors, which
the irq_desc then maps directly on to. Systems with a high
number of off-chip IRQs will want to treat this as
experimental until they have been independently verified.

source "mm/Kconfig"

config FORCE_MAX_ZONEORDER
Expand Down
66 changes: 33 additions & 33 deletions arch/arm/common/gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,57 +50,56 @@ struct gic_chip_data {

static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly;

static inline void __iomem *gic_dist_base(unsigned int irq)
static inline void __iomem *gic_dist_base(struct irq_data *d)
{
struct gic_chip_data *gic_data = get_irq_chip_data(irq);
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
return gic_data->dist_base;
}

static inline void __iomem *gic_cpu_base(unsigned int irq)
static inline void __iomem *gic_cpu_base(struct irq_data *d)
{
struct gic_chip_data *gic_data = get_irq_chip_data(irq);
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
return gic_data->cpu_base;
}

static inline unsigned int gic_irq(unsigned int irq)
static inline unsigned int gic_irq(struct irq_data *d)
{
struct gic_chip_data *gic_data = get_irq_chip_data(irq);
return irq - gic_data->irq_offset;
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
return d->irq - gic_data->irq_offset;
}

/*
* Routines to acknowledge, disable and enable interrupts
*/
static void gic_ack_irq(unsigned int irq)
static void gic_ack_irq(struct irq_data *d)
{

spin_lock(&irq_controller_lock);
writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI);
writel(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
spin_unlock(&irq_controller_lock);
}

static void gic_mask_irq(unsigned int irq)
static void gic_mask_irq(struct irq_data *d)
{
u32 mask = 1 << (irq % 32);
u32 mask = 1 << (d->irq % 32);

spin_lock(&irq_controller_lock);
writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4);
writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
spin_unlock(&irq_controller_lock);
}

static void gic_unmask_irq(unsigned int irq)
static void gic_unmask_irq(struct irq_data *d)
{
u32 mask = 1 << (irq % 32);
u32 mask = 1 << (d->irq % 32);

spin_lock(&irq_controller_lock);
writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_SET + (gic_irq(irq) / 32) * 4);
writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4);
spin_unlock(&irq_controller_lock);
}

static int gic_set_type(unsigned int irq, unsigned int type)
static int gic_set_type(struct irq_data *d, unsigned int type)
{
void __iomem *base = gic_dist_base(irq);
unsigned int gicirq = gic_irq(irq);
void __iomem *base = gic_dist_base(d);
unsigned int gicirq = gic_irq(d);
u32 enablemask = 1 << (gicirq % 32);
u32 enableoff = (gicirq / 32) * 4;
u32 confmask = 0x2 << ((gicirq % 16) * 2);
Expand Down Expand Up @@ -143,21 +142,22 @@ static int gic_set_type(unsigned int irq, unsigned int type)
}

#ifdef CONFIG_SMP
static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val)
static int
gic_set_cpu(struct irq_data *d, const struct cpumask *mask_val, bool force)
{
void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3);
unsigned int shift = (irq % 4) * 8;
void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
unsigned int shift = (d->irq % 4) * 8;
unsigned int cpu = cpumask_first(mask_val);
u32 val;
struct irq_desc *desc;

spin_lock(&irq_controller_lock);
desc = irq_to_desc(irq);
desc = irq_to_desc(d->irq);
if (desc == NULL) {
spin_unlock(&irq_controller_lock);
return -EINVAL;
}
desc->node = cpu;
d->node = cpu;
val = readl(reg) & ~(0xff << shift);
val |= 1 << (cpu + shift);
writel(val, reg);
Expand All @@ -175,7 +175,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
unsigned long status;

/* primary controller ack'ing */
chip->ack(irq);
chip->irq_ack(&desc->irq_data);

spin_lock(&irq_controller_lock);
status = readl(chip_data->cpu_base + GIC_CPU_INTACK);
Expand All @@ -193,17 +193,17 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)

out:
/* primary controller unmasking */
chip->unmask(irq);
chip->irq_unmask(&desc->irq_data);
}

static struct irq_chip gic_chip = {
.name = "GIC",
.ack = gic_ack_irq,
.mask = gic_mask_irq,
.unmask = gic_unmask_irq,
.set_type = gic_set_type,
.name = "GIC",
.irq_ack = gic_ack_irq,
.irq_mask = gic_mask_irq,
.irq_unmask = gic_unmask_irq,
.irq_set_type = gic_set_type,
#ifdef CONFIG_SMP
.set_affinity = gic_set_cpu,
.irq_set_affinity = gic_set_cpu,
#endif
};

Expand Down Expand Up @@ -337,7 +337,7 @@ void __cpuinit gic_enable_ppi(unsigned int irq)

local_irq_save(flags);
irq_to_desc(irq)->status |= IRQ_NOPROBE;
gic_unmask_irq(irq);
gic_unmask_irq(irq_get_irq_data(irq));
local_irq_restore(flags);
}

Expand Down
14 changes: 9 additions & 5 deletions arch/arm/common/it8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@

#define MAX_SLOTS 21

static void it8152_mask_irq(unsigned int irq)
static void it8152_mask_irq(struct irq_data *d)
{
unsigned int irq = d->irq;

if (irq >= IT8152_LD_IRQ(0)) {
__raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) |
(1 << (irq - IT8152_LD_IRQ(0)))),
Expand All @@ -48,8 +50,10 @@ static void it8152_mask_irq(unsigned int irq)
}
}

static void it8152_unmask_irq(unsigned int irq)
static void it8152_unmask_irq(struct irq_data *d)
{
unsigned int irq = d->irq;

if (irq >= IT8152_LD_IRQ(0)) {
__raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) &
~(1 << (irq - IT8152_LD_IRQ(0)))),
Expand All @@ -67,9 +71,9 @@ static void it8152_unmask_irq(unsigned int irq)

static struct irq_chip it8152_irq_chip = {
.name = "it8152",
.ack = it8152_mask_irq,
.mask = it8152_mask_irq,
.unmask = it8152_unmask_irq,
.irq_ack = it8152_mask_irq,
.irq_mask = it8152_mask_irq,
.irq_unmask = it8152_unmask_irq,
};

void it8152_init_irq(void)
Expand Down
24 changes: 12 additions & 12 deletions arch/arm/common/locomo.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc)
int req, i;

/* Acknowledge the parent IRQ */
desc->chip->ack(irq);
desc->irq_data.chip->irq_ack(&desc->irq_data);

/* check why this interrupt was generated */
req = locomo_readl(lchip->base + LOCOMO_ICR) & 0x0f00;
Expand All @@ -161,33 +161,33 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc)
}
}

static void locomo_ack_irq(unsigned int irq)
static void locomo_ack_irq(struct irq_data *d)
{
}

static void locomo_mask_irq(unsigned int irq)
static void locomo_mask_irq(struct irq_data *d)
{
struct locomo *lchip = get_irq_chip_data(irq);
struct locomo *lchip = irq_data_get_irq_chip_data(d);
unsigned int r;
r = locomo_readl(lchip->base + LOCOMO_ICR);
r &= ~(0x0010 << (irq - lchip->irq_base));
r &= ~(0x0010 << (d->irq - lchip->irq_base));
locomo_writel(r, lchip->base + LOCOMO_ICR);
}

static void locomo_unmask_irq(unsigned int irq)
static void locomo_unmask_irq(struct irq_data *d)
{
struct locomo *lchip = get_irq_chip_data(irq);
struct locomo *lchip = irq_data_get_irq_chip_data(d);
unsigned int r;
r = locomo_readl(lchip->base + LOCOMO_ICR);
r |= (0x0010 << (irq - lchip->irq_base));
r |= (0x0010 << (d->irq - lchip->irq_base));
locomo_writel(r, lchip->base + LOCOMO_ICR);
}

static struct irq_chip locomo_chip = {
.name = "LOCOMO",
.ack = locomo_ack_irq,
.mask = locomo_mask_irq,
.unmask = locomo_unmask_irq,
.name = "LOCOMO",
.irq_ack = locomo_ack_irq,
.irq_mask = locomo_mask_irq,
.irq_unmask = locomo_unmask_irq,
};

static void locomo_setup_irq(struct locomo *lchip)
Expand Down
Loading

0 comments on commit 16c1020

Please sign in to comment.