| .. | .. |
|---|
| 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/reboot.h> |
|---|
| 24 | 25 | #include <asm/bootinfo.h> |
|---|
| .. | .. |
|---|
| 63 | 64 | |
|---|
| 64 | 65 | return IRQ_HANDLED; |
|---|
| 65 | 66 | } |
|---|
| 66 | | - |
|---|
| 67 | | -static struct irqaction ar2315_ahb_err_interrupt = { |
|---|
| 68 | | - .handler = ar2315_ahb_err_handler, |
|---|
| 69 | | - .name = "ar2315-ahb-error", |
|---|
| 70 | | -}; |
|---|
| 71 | 67 | |
|---|
| 72 | 68 | static void ar2315_misc_irq_handler(struct irq_desc *desc) |
|---|
| 73 | 69 | { |
|---|
| .. | .. |
|---|
| 159 | 155 | panic("Failed to add IRQ domain"); |
|---|
| 160 | 156 | |
|---|
| 161 | 157 | irq = irq_create_mapping(domain, AR2315_MISC_IRQ_AHB); |
|---|
| 162 | | - setup_irq(irq, &ar2315_ahb_err_interrupt); |
|---|
| 158 | + if (request_irq(irq, ar2315_ahb_err_handler, 0, "ar2315-ahb-error", |
|---|
| 159 | + NULL)) |
|---|
| 160 | + pr_err("Failed to register ar2315-ahb-error interrupt\n"); |
|---|
| 163 | 161 | |
|---|
| 164 | 162 | irq_set_chained_handler_and_data(AR2315_IRQ_MISC, |
|---|
| 165 | 163 | ar2315_misc_irq_handler, domain); |
|---|
| .. | .. |
|---|
| 262 | 260 | u32 config; |
|---|
| 263 | 261 | |
|---|
| 264 | 262 | /* Detect memory size */ |
|---|
| 265 | | - sdram_base = ioremap_nocache(AR2315_SDRAMCTL_BASE, |
|---|
| 263 | + sdram_base = ioremap(AR2315_SDRAMCTL_BASE, |
|---|
| 266 | 264 | AR2315_SDRAMCTL_SIZE); |
|---|
| 267 | 265 | memcfg = __raw_readl(sdram_base + AR2315_MEM_CFG); |
|---|
| 268 | 266 | memsize = 1 + ATH25_REG_MS(memcfg, AR2315_MEM_CFG_DATA_WIDTH); |
|---|
| 269 | 267 | memsize <<= 1 + ATH25_REG_MS(memcfg, AR2315_MEM_CFG_COL_WIDTH); |
|---|
| 270 | 268 | memsize <<= 1 + ATH25_REG_MS(memcfg, AR2315_MEM_CFG_ROW_WIDTH); |
|---|
| 271 | 269 | memsize <<= 3; |
|---|
| 272 | | - add_memory_region(0, memsize, BOOT_MEM_RAM); |
|---|
| 270 | + memblock_add(0, memsize); |
|---|
| 273 | 271 | iounmap(sdram_base); |
|---|
| 274 | 272 | |
|---|
| 275 | | - ar2315_rst_base = ioremap_nocache(AR2315_RST_BASE, AR2315_RST_SIZE); |
|---|
| 273 | + ar2315_rst_base = ioremap(AR2315_RST_BASE, AR2315_RST_SIZE); |
|---|
| 276 | 274 | |
|---|
| 277 | 275 | /* Detect the hardware based on the device ID */ |
|---|
| 278 | 276 | devid = ar2315_rst_reg_read(AR2315_SREV) & AR2315_REV_CHIP; |
|---|