| .. | .. |
|---|
| 19 | 19 | #include <linux/bitops.h> |
|---|
| 20 | 20 | #include <linux/irqdomain.h> |
|---|
| 21 | 21 | #include <linux/interrupt.h> |
|---|
| 22 | +#include <linux/memblock.h> |
|---|
| 22 | 23 | #include <linux/platform_device.h> |
|---|
| 23 | 24 | #include <linux/mtd/physmap.h> |
|---|
| 24 | 25 | #include <linux/reboot.h> |
|---|
| .. | .. |
|---|
| 67 | 68 | machine_restart("AHB error"); /* Catastrophic failure */ |
|---|
| 68 | 69 | return IRQ_HANDLED; |
|---|
| 69 | 70 | } |
|---|
| 70 | | - |
|---|
| 71 | | -static struct irqaction ar5312_ahb_err_interrupt = { |
|---|
| 72 | | - .handler = ar5312_ahb_err_handler, |
|---|
| 73 | | - .name = "ar5312-ahb-error", |
|---|
| 74 | | -}; |
|---|
| 75 | 71 | |
|---|
| 76 | 72 | static void ar5312_misc_irq_handler(struct irq_desc *desc) |
|---|
| 77 | 73 | { |
|---|
| .. | .. |
|---|
| 154 | 150 | panic("Failed to add IRQ domain"); |
|---|
| 155 | 151 | |
|---|
| 156 | 152 | irq = irq_create_mapping(domain, AR5312_MISC_IRQ_AHB_PROC); |
|---|
| 157 | | - setup_irq(irq, &ar5312_ahb_err_interrupt); |
|---|
| 153 | + if (request_irq(irq, ar5312_ahb_err_handler, 0, "ar5312-ahb-error", |
|---|
| 154 | + NULL)) |
|---|
| 155 | + pr_err("Failed to register ar5312-ahb-error interrupt\n"); |
|---|
| 158 | 156 | |
|---|
| 159 | 157 | irq_set_chained_handler_and_data(AR5312_IRQ_MISC, |
|---|
| 160 | 158 | ar5312_misc_irq_handler, domain); |
|---|
| .. | .. |
|---|
| 185 | 183 | void __iomem *flashctl_base; |
|---|
| 186 | 184 | u32 ctl; |
|---|
| 187 | 185 | |
|---|
| 188 | | - flashctl_base = ioremap_nocache(AR5312_FLASHCTL_BASE, |
|---|
| 186 | + flashctl_base = ioremap(AR5312_FLASHCTL_BASE, |
|---|
| 189 | 187 | AR5312_FLASHCTL_SIZE); |
|---|
| 190 | 188 | |
|---|
| 191 | 189 | ctl = __raw_readl(flashctl_base + AR5312_FLASHCTL0); |
|---|
| .. | .. |
|---|
| 358 | 356 | u32 devid; |
|---|
| 359 | 357 | |
|---|
| 360 | 358 | /* Detect memory size */ |
|---|
| 361 | | - sdram_base = ioremap_nocache(AR5312_SDRAMCTL_BASE, |
|---|
| 359 | + sdram_base = ioremap(AR5312_SDRAMCTL_BASE, |
|---|
| 362 | 360 | AR5312_SDRAMCTL_SIZE); |
|---|
| 363 | 361 | memcfg = __raw_readl(sdram_base + AR5312_MEM_CFG1); |
|---|
| 364 | 362 | bank0_ac = ATH25_REG_MS(memcfg, AR5312_MEM_CFG1_AC0); |
|---|
| .. | .. |
|---|
| 366 | 364 | memsize = (bank0_ac ? (1 << (bank0_ac + 1)) : 0) + |
|---|
| 367 | 365 | (bank1_ac ? (1 << (bank1_ac + 1)) : 0); |
|---|
| 368 | 366 | memsize <<= 20; |
|---|
| 369 | | - add_memory_region(0, memsize, BOOT_MEM_RAM); |
|---|
| 367 | + memblock_add(0, memsize); |
|---|
| 370 | 368 | iounmap(sdram_base); |
|---|
| 371 | 369 | |
|---|
| 372 | | - ar5312_rst_base = ioremap_nocache(AR5312_RST_BASE, AR5312_RST_SIZE); |
|---|
| 370 | + ar5312_rst_base = ioremap(AR5312_RST_BASE, AR5312_RST_SIZE); |
|---|
| 373 | 371 | |
|---|
| 374 | 372 | devid = ar5312_rst_reg_read(AR5312_REV); |
|---|
| 375 | 373 | devid >>= AR5312_REV_WMAC_MIN_S; |
|---|