Commit 54815366 authored by Russell King's avatar Russell King Committed by Russell King

[ARM] Rename chipdata to 'base' and make it an iomem pointer

In all current use cases, "chipdata" is used to store an iomem address.
Mark it with __iomem, and rename it to 'base'.  Leave the accessor macros
alone.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 5d25ac03
...@@ -60,7 +60,7 @@ struct locomo { ...@@ -60,7 +60,7 @@ struct locomo {
unsigned long phys; unsigned long phys;
unsigned int irq; unsigned int irq;
spinlock_t lock; spinlock_t lock;
void *base; void __iomem *base;
}; };
struct locomo_dev_info { struct locomo_dev_info {
...@@ -162,7 +162,7 @@ static void locomo_handler(unsigned int irq, struct irqdesc *desc, ...@@ -162,7 +162,7 @@ static void locomo_handler(unsigned int irq, struct irqdesc *desc,
{ {
int req, i; int req, i;
struct irqdesc *d; struct irqdesc *d;
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
/* Acknowledge the parent IRQ */ /* Acknowledge the parent IRQ */
desc->chip->ack(irq); desc->chip->ack(irq);
...@@ -189,7 +189,7 @@ static void locomo_ack_irq(unsigned int irq) ...@@ -189,7 +189,7 @@ static void locomo_ack_irq(unsigned int irq)
static void locomo_mask_irq(unsigned int irq) static void locomo_mask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_ICR); r = locomo_readl(mapbase + LOCOMO_ICR);
r &= ~(0x0010 << (irq - LOCOMO_IRQ_START)); r &= ~(0x0010 << (irq - LOCOMO_IRQ_START));
...@@ -198,7 +198,7 @@ static void locomo_mask_irq(unsigned int irq) ...@@ -198,7 +198,7 @@ static void locomo_mask_irq(unsigned int irq)
static void locomo_unmask_irq(unsigned int irq) static void locomo_unmask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_ICR); r = locomo_readl(mapbase + LOCOMO_ICR);
r |= (0x0010 << (irq - LOCOMO_IRQ_START)); r |= (0x0010 << (irq - LOCOMO_IRQ_START));
...@@ -215,7 +215,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc, ...@@ -215,7 +215,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct irqdesc *d; struct irqdesc *d;
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) {
d = irq_desc + LOCOMO_IRQ_KEY_START; d = irq_desc + LOCOMO_IRQ_KEY_START;
...@@ -225,7 +225,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc, ...@@ -225,7 +225,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc,
static void locomo_key_ack_irq(unsigned int irq) static void locomo_key_ack_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START)); r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START));
...@@ -234,7 +234,7 @@ static void locomo_key_ack_irq(unsigned int irq) ...@@ -234,7 +234,7 @@ static void locomo_key_ack_irq(unsigned int irq)
static void locomo_key_mask_irq(unsigned int irq) static void locomo_key_mask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START)); r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START));
...@@ -243,7 +243,7 @@ static void locomo_key_mask_irq(unsigned int irq) ...@@ -243,7 +243,7 @@ static void locomo_key_mask_irq(unsigned int irq)
static void locomo_key_unmask_irq(unsigned int irq) static void locomo_key_unmask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START)); r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START));
...@@ -261,7 +261,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc, ...@@ -261,7 +261,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc,
{ {
int req, i; int req, i;
struct irqdesc *d; struct irqdesc *d;
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
req = locomo_readl(mapbase + LOCOMO_GIR) & req = locomo_readl(mapbase + LOCOMO_GIR) &
locomo_readl(mapbase + LOCOMO_GPD) & locomo_readl(mapbase + LOCOMO_GPD) &
...@@ -280,7 +280,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc, ...@@ -280,7 +280,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc,
static void locomo_gpio_ack_irq(unsigned int irq) static void locomo_gpio_ack_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_GWE); r = locomo_readl(mapbase + LOCOMO_GWE);
r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
...@@ -297,7 +297,7 @@ static void locomo_gpio_ack_irq(unsigned int irq) ...@@ -297,7 +297,7 @@ static void locomo_gpio_ack_irq(unsigned int irq)
static void locomo_gpio_mask_irq(unsigned int irq) static void locomo_gpio_mask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_GIE); r = locomo_readl(mapbase + LOCOMO_GIE);
r &= ~(0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); r &= ~(0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
...@@ -306,7 +306,7 @@ static void locomo_gpio_mask_irq(unsigned int irq) ...@@ -306,7 +306,7 @@ static void locomo_gpio_mask_irq(unsigned int irq)
static void locomo_gpio_unmask_irq(unsigned int irq) static void locomo_gpio_unmask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_GIE); r = locomo_readl(mapbase + LOCOMO_GIE);
r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
...@@ -323,7 +323,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc, ...@@ -323,7 +323,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc,
struct pt_regs *regs) struct pt_regs *regs)
{ {
struct irqdesc *d; struct irqdesc *d;
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
d = irq_desc + LOCOMO_IRQ_LT_START; d = irq_desc + LOCOMO_IRQ_LT_START;
...@@ -333,7 +333,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc, ...@@ -333,7 +333,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc,
static void locomo_lt_ack_irq(unsigned int irq) static void locomo_lt_ack_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_LTINT); r = locomo_readl(mapbase + LOCOMO_LTINT);
r &= ~(0x0100 << (irq - LOCOMO_IRQ_LT_START)); r &= ~(0x0100 << (irq - LOCOMO_IRQ_LT_START));
...@@ -342,7 +342,7 @@ static void locomo_lt_ack_irq(unsigned int irq) ...@@ -342,7 +342,7 @@ static void locomo_lt_ack_irq(unsigned int irq)
static void locomo_lt_mask_irq(unsigned int irq) static void locomo_lt_mask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_LTINT); r = locomo_readl(mapbase + LOCOMO_LTINT);
r &= ~(0x0010 << (irq - LOCOMO_IRQ_LT_START)); r &= ~(0x0010 << (irq - LOCOMO_IRQ_LT_START));
...@@ -351,7 +351,7 @@ static void locomo_lt_mask_irq(unsigned int irq) ...@@ -351,7 +351,7 @@ static void locomo_lt_mask_irq(unsigned int irq)
static void locomo_lt_unmask_irq(unsigned int irq) static void locomo_lt_unmask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_LTINT); r = locomo_readl(mapbase + LOCOMO_LTINT);
r |= (0x0010 << (irq - LOCOMO_IRQ_LT_START)); r |= (0x0010 << (irq - LOCOMO_IRQ_LT_START));
...@@ -369,7 +369,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, ...@@ -369,7 +369,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc,
{ {
int req, i; int req, i;
struct irqdesc *d; struct irqdesc *d;
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F; req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F;
if (req) { if (req) {
...@@ -386,7 +386,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, ...@@ -386,7 +386,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc,
static void locomo_spi_ack_irq(unsigned int irq) static void locomo_spi_ack_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIWE); r = locomo_readl(mapbase + LOCOMO_SPIWE);
r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START));
...@@ -403,7 +403,7 @@ static void locomo_spi_ack_irq(unsigned int irq) ...@@ -403,7 +403,7 @@ static void locomo_spi_ack_irq(unsigned int irq)
static void locomo_spi_mask_irq(unsigned int irq) static void locomo_spi_mask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIIE); r = locomo_readl(mapbase + LOCOMO_SPIIE);
r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START));
...@@ -412,7 +412,7 @@ static void locomo_spi_mask_irq(unsigned int irq) ...@@ -412,7 +412,7 @@ static void locomo_spi_mask_irq(unsigned int irq)
static void locomo_spi_unmask_irq(unsigned int irq) static void locomo_spi_unmask_irq(unsigned int irq)
{ {
void *mapbase = get_irq_chipdata(irq); void __iomem *mapbase = get_irq_chipdata(irq);
unsigned int r; unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIIE); r = locomo_readl(mapbase + LOCOMO_SPIIE);
r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START));
...@@ -428,7 +428,7 @@ static struct irqchip locomo_spi_chip = { ...@@ -428,7 +428,7 @@ static struct irqchip locomo_spi_chip = {
static void locomo_setup_irq(struct locomo *lchip) static void locomo_setup_irq(struct locomo *lchip)
{ {
int irq; int irq;
void *irqbase = lchip->base; void __iomem *irqbase = lchip->base;
/* /*
* Install handler for IRQ_LOCOMO_HW. * Install handler for IRQ_LOCOMO_HW.
......
...@@ -261,7 +261,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs ...@@ -261,7 +261,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
void __iomem *pio; void __iomem *pio;
u32 isr; u32 isr;
pio = (void __force __iomem *) desc->chipdata; pio = desc->base;
/* temporarily mask (level sensitive) parent IRQ */ /* temporarily mask (level sensitive) parent IRQ */
desc->chip->ack(irq); desc->chip->ack(irq);
...@@ -312,7 +312,7 @@ void __init at91_gpio_irq_setup(unsigned banks) ...@@ -312,7 +312,7 @@ void __init at91_gpio_irq_setup(unsigned banks)
__raw_writel(~0, controller + PIO_IDR); __raw_writel(~0, controller + PIO_IDR);
set_irq_data(id, (void *) pin); set_irq_data(id, (void *) pin);
set_irq_chipdata(id, (void __force *) controller); set_irq_chipdata(id, controller);
for (i = 0; i < 32; i++, pin++) { for (i = 0; i < 32; i++, pin++) {
set_irq_chip(pin, &gpio_irqchip); set_irq_chip(pin, &gpio_irqchip);
......
...@@ -61,7 +61,7 @@ struct irqdesc { ...@@ -61,7 +61,7 @@ struct irqdesc {
struct irqchip *chip; struct irqchip *chip;
struct irqaction *action; struct irqaction *action;
struct list_head pend; struct list_head pend;
void *chipdata; void __iomem *base;
void *data; void *data;
unsigned int disable_depth; unsigned int disable_depth;
...@@ -113,8 +113,8 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int); ...@@ -113,8 +113,8 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int);
#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) #define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0)
#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) #define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1)
#define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) #define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0)
#define set_irq_chipdata(irq,d) do { irq_desc[irq].chipdata = d; } while (0) #define set_irq_chipdata(irq,d) do { irq_desc[irq].base = d; } while (0)
#define get_irq_chipdata(irq) (irq_desc[irq].chipdata) #define get_irq_chipdata(irq) (irq_desc[irq].base)
void set_irq_chip(unsigned int irq, struct irqchip *); void set_irq_chip(unsigned int irq, struct irqchip *);
void set_irq_flags(unsigned int irq, unsigned int flags); void set_irq_flags(unsigned int irq, unsigned int flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment