Deleted Added
full compact
aml8726_pic.c (282620) aml8726_pic.c (283057)
1/*-
2 * Copyright 2013-2015 John Wehle <john@feith.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 25 unchanged lines hidden (view full) ---

34 * ... this allows for interrupt handling to be spread across the cpus.
35 *
36 * The multicore chips also have a GIC ... typically they run SMP kernels
37 * which include the GIC driver in which case this driver is simply used
38 * to disable the PIC.
39 */
40
41#include <sys/cdefs.h>
1/*-
2 * Copyright 2013-2015 John Wehle <john@feith.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 25 unchanged lines hidden (view full) ---

34 * ... this allows for interrupt handling to be spread across the cpus.
35 *
36 * The multicore chips also have a GIC ... typically they run SMP kernels
37 * which include the GIC driver in which case this driver is simply used
38 * to disable the PIC.
39 */
40
41#include <sys/cdefs.h>
42__FBSDID("$FreeBSD: head/sys/arm/amlogic/aml8726/aml8726_pic.c 282620 2015-05-08 04:38:01Z ganbold $");
42__FBSDID("$FreeBSD: head/sys/arm/amlogic/aml8726/aml8726_pic.c 283057 2015-05-18 11:04:07Z andrew $");
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/conf.h>
47#include <sys/bus.h>
48#include <sys/kernel.h>
49#include <sys/module.h>
50#include <sys/resource.h>

--- 113 unchanged lines hidden (view full) ---

164 * Disable, clear, and set the interrupts to normal mode.
165 */
166 for (i = 0; i < AML_PIC_NCNTRLS; i++) {
167 CSR_WRITE_4(sc, AML_PIC_0_MASK_REG + i * 16, 0);
168 CSR_WRITE_4(sc, AML_PIC_0_STAT_CLR_REG + i * 16, ~0u);
169 CSR_WRITE_4(sc, AML_PIC_0_FIRQ_SEL + i * 16, 0);
170 }
171
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/conf.h>
47#include <sys/bus.h>
48#include <sys/kernel.h>
49#include <sys/module.h>
50#include <sys/resource.h>

--- 113 unchanged lines hidden (view full) ---

164 * Disable, clear, and set the interrupts to normal mode.
165 */
166 for (i = 0; i < AML_PIC_NCNTRLS; i++) {
167 CSR_WRITE_4(sc, AML_PIC_0_MASK_REG + i * 16, 0);
168 CSR_WRITE_4(sc, AML_PIC_0_STAT_CLR_REG + i * 16, ~0u);
169 CSR_WRITE_4(sc, AML_PIC_0_FIRQ_SEL + i * 16, 0);
170 }
171
172#ifndef SMP
172#ifndef DEV_GIC
173 arm_post_filter = aml8726_pic_eoi;
174#else
175 device_printf(dev, "disabled in favor of gic\n");
176#endif
177
178 aml8726_pic_sc = sc;
179
180 return (0);

--- 21 unchanged lines hidden (view full) ---

202 sizeof(struct aml8726_pic_softc),
203};
204
205static devclass_t aml8726_pic_devclass;
206
207EARLY_DRIVER_MODULE(pic, simplebus, aml8726_pic_driver, aml8726_pic_devclass,
208 0, 0, BUS_PASS_INTERRUPT);
209
173 arm_post_filter = aml8726_pic_eoi;
174#else
175 device_printf(dev, "disabled in favor of gic\n");
176#endif
177
178 aml8726_pic_sc = sc;
179
180 return (0);

--- 21 unchanged lines hidden (view full) ---

202 sizeof(struct aml8726_pic_softc),
203};
204
205static devclass_t aml8726_pic_devclass;
206
207EARLY_DRIVER_MODULE(pic, simplebus, aml8726_pic_driver, aml8726_pic_devclass,
208 0, 0, BUS_PASS_INTERRUPT);
209
210#ifndef SMP
210#ifndef DEV_GIC
211int
212arm_get_next_irq(int last)
213{
214 uint32_t value;
215 int irq;
216 int start;
217
218 /*

--- 60 unchanged lines hidden ---
211int
212arm_get_next_irq(int last)
213{
214 uint32_t value;
215 int irq;
216 int start;
217
218 /*

--- 60 unchanged lines hidden ---