PERFORCE change 71638 for review
John-Mark Gurney
jmg at FreeBSD.org
Tue Feb 22 23:13:44 PST 2005
http://perforce.freebsd.org/chv.cgi?CH=71638
Change 71638 by jmg at jmg_carbon on 2005/02/23 07:12:44
keep the rid around for the resources if/when we release them...
Affected files ...
.. //depot/projects/arm/src/sys/arm/ep93xx/epclk.c#4 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/ep93xx/epclk.c#4 (text+ko) ====
@@ -115,10 +115,12 @@
}
struct epclk_softc {
+ int sc_timerrid;
struct resource *sc_timerres;
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
+ int sc_irqrid;
struct resource *sc_irqres;
void *sc_irqcookie;
@@ -131,13 +133,12 @@
static int
epclk_attach(device_t dev)
{
- int i;
epclk = device_get_softc(dev);
- i = 0;
- epclk->sc_timerres = bus_alloc_resource(dev, SYS_RES_MEMORY, &i, 0, ~0,
- ~0, RF_ACTIVE);
+ epclk->sc_timerrid = 0;
+ epclk->sc_timerres = bus_alloc_resource(dev, SYS_RES_MEMORY,
+ &epclk->sc_timerrid, 0, ~0, ~0, RF_ACTIVE);
if (epclk->sc_timerres == NULL)
return ENXIO;
@@ -192,7 +193,6 @@
void
cpu_initclocks(void)
{
- int rid;
stathz = profhz = 0;
@@ -202,9 +202,9 @@
/* clear 64Hz interrupt status */
bus_space_write_4(epclk->sc_iot, epclk->sc_teoi_ioh, 0, 1);
- rid = 0;
- epclk->sc_irqres = bus_alloc_resource(epclk->dev, SYS_RES_IRQ, &rid,
- 0, ~0, 1, RF_ACTIVE);
+ epclk->sc_irqrid = 0;
+ epclk->sc_irqres = bus_alloc_resource(epclk->dev, SYS_RES_IRQ,
+ &epclk->sc_irqrid, 0, ~0, 1, RF_ACTIVE);
if (!epclk->sc_irqres)
panic("Unable to setup the clock irq handler.\n");
else
More information about the p4-projects
mailing list