hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/mips/ath25/ar2315.c
....@@ -19,6 +19,7 @@
1919 #include <linux/bitops.h>
2020 #include <linux/irqdomain.h>
2121 #include <linux/interrupt.h>
22
+#include <linux/memblock.h>
2223 #include <linux/platform_device.h>
2324 #include <linux/reboot.h>
2425 #include <asm/bootinfo.h>
....@@ -63,11 +64,6 @@
6364
6465 return IRQ_HANDLED;
6566 }
66
-
67
-static struct irqaction ar2315_ahb_err_interrupt = {
68
- .handler = ar2315_ahb_err_handler,
69
- .name = "ar2315-ahb-error",
70
-};
7167
7268 static void ar2315_misc_irq_handler(struct irq_desc *desc)
7369 {
....@@ -159,7 +155,9 @@
159155 panic("Failed to add IRQ domain");
160156
161157 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");
163161
164162 irq_set_chained_handler_and_data(AR2315_IRQ_MISC,
165163 ar2315_misc_irq_handler, domain);
....@@ -262,17 +260,17 @@
262260 u32 config;
263261
264262 /* Detect memory size */
265
- sdram_base = ioremap_nocache(AR2315_SDRAMCTL_BASE,
263
+ sdram_base = ioremap(AR2315_SDRAMCTL_BASE,
266264 AR2315_SDRAMCTL_SIZE);
267265 memcfg = __raw_readl(sdram_base + AR2315_MEM_CFG);
268266 memsize = 1 + ATH25_REG_MS(memcfg, AR2315_MEM_CFG_DATA_WIDTH);
269267 memsize <<= 1 + ATH25_REG_MS(memcfg, AR2315_MEM_CFG_COL_WIDTH);
270268 memsize <<= 1 + ATH25_REG_MS(memcfg, AR2315_MEM_CFG_ROW_WIDTH);
271269 memsize <<= 3;
272
- add_memory_region(0, memsize, BOOT_MEM_RAM);
270
+ memblock_add(0, memsize);
273271 iounmap(sdram_base);
274272
275
- ar2315_rst_base = ioremap_nocache(AR2315_RST_BASE, AR2315_RST_SIZE);
273
+ ar2315_rst_base = ioremap(AR2315_RST_BASE, AR2315_RST_SIZE);
276274
277275 /* Detect the hardware based on the device ID */
278276 devid = ar2315_rst_reg_read(AR2315_SREV) & AR2315_REV_CHIP;