summaryrefslogtreecommitdiffstats
path: root/sys/arm/at91/at91rm9200.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2012-07-12 02:58:45 +0000
committerimp <imp@FreeBSD.org>2012-07-12 02:58:45 +0000
commit8cc7a49b9609578a34b73a544be8d8cd3b7faacf (patch)
tree41072dce977d30d8360565a0d526330e42067f71 /sys/arm/at91/at91rm9200.c
parenta32f7c6c144e4a515379e6f4ec89a48a4e50f8b2 (diff)
downloadFreeBSD-src-8cc7a49b9609578a34b73a544be8d8cd3b7faacf.zip
FreeBSD-src-8cc7a49b9609578a34b73a544be8d8cd3b7faacf.tar.gz
Export the interrupt status vector via soc_data. Set the interrupt
priorities in the AIC in the atmelarm driver before attaching the children. Delete redunant copies of the code.
Diffstat (limited to 'sys/arm/at91/at91rm9200.c')
-rw-r--r--sys/arm/at91/at91rm9200.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/sys/arm/at91/at91rm9200.c b/sys/arm/at91/at91rm9200.c
index 51627f0..f50bd67 100644
--- a/sys/arm/at91/at91rm9200.c
+++ b/sys/arm/at91/at91rm9200.c
@@ -183,8 +183,6 @@ at91_attach(device_t dev)
{
struct at91_pmc_clock *clk;
struct at91rm92_softc *sc = device_get_softc(dev);
- int i;
-
struct at91_softc *at91sc = device_get_softc(device_get_parent(dev));
sc->sc_st = at91sc->sc_st;
@@ -195,31 +193,6 @@ at91_attach(device_t dev)
AT91RM92_SYS_SIZE, &sc->sc_sys_sh) != 0)
panic("Enable to map system registers");
- if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_AIC_BASE,
- AT91RM92_AIC_SIZE, &sc->sc_aic_sh) != 0)
- panic("Enable to map system registers");
-
- /* XXX Hack to tell atmelarm about the AIC */
- at91sc->sc_aic_sh = sc->sc_aic_sh;
-
- for (i = 0; i < 32; i++) {
- bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR +
- i * 4, i);
- /* Priority. */
- bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4,
- at91_irq_prio[i]);
- if (i < 8)
- bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR,
- 1);
- }
-
- bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32);
- /* No debug. */
- bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0);
- /* Disable and clear all interrupts. */
- bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff);
- bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff);
-
/* Disable all interrupts for RTC (0xe24 == RTC_IDR) */
bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xe24, 0xffffffff);
@@ -283,7 +256,8 @@ DRIVER_MODULE(at91rm920, atmelarm, at91rm92_driver, at91rm92_devclass, 0, 0);
static struct at91_soc_data soc_data = {
.soc_delay = at91_st_delay,
- .soc_reset = at91_st_cpu_reset
+ .soc_reset = at91_st_cpu_reset,
+ .soc_irq_prio = at91_irq_prio,
};
AT91_SOC(AT91_T_RM9200, &soc_data);
OpenPOWER on IntegriCloud