svn commit: r265440 - head/sys/arm/arm
Ian Lepore
ian at FreeBSD.org
Tue May 6 13:38:35 UTC 2014
Author: ian
Date: Tue May 6 13:38:34 2014
New Revision: 265440
URL: http://svnweb.freebsd.org/changeset/base/265440
Log:
Move the pl310.enabled tunable to hw.pl310.enabled. Clean up a few minor
style(9) nits. Use DEVMETHOD_END.
Modified:
head/sys/arm/arm/pl310.c
Modified: head/sys/arm/arm/pl310.c
==============================================================================
--- head/sys/arm/arm/pl310.c Tue May 6 12:39:23 2014 (r265439)
+++ head/sys/arm/arm/pl310.c Tue May 6 13:38:34 2014 (r265440)
@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
} while(0);
static int pl310_enabled = 1;
-TUNABLE_INT("pl310.enabled", &pl310_enabled);
+TUNABLE_INT("hw.pl310.enabled", &pl310_enabled);
static uint32_t g_l2cache_way_mask;
@@ -149,7 +149,8 @@ static __inline void
pl310_wait_background_op(uint32_t off, uint32_t mask)
{
- while (pl310_read4(pl310_softc, off) & mask);
+ while (pl310_read4(pl310_softc, off) & mask)
+ continue;
}
@@ -167,6 +168,7 @@ pl310_wait_background_op(uint32_t off, u
static __inline void
pl310_cache_sync(void)
{
+
if ((pl310_softc == NULL) || !pl310_softc->sc_enabled)
return;
@@ -335,12 +337,13 @@ static int
pl310_attach(device_t dev)
{
struct pl310_softc *sc = device_get_softc(dev);
- int rid = 0;
+ int rid;
uint32_t aux_value;
uint32_t ctrl_value;
uint32_t cache_id;
sc->sc_dev = dev;
+ rid = 0;
sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
RF_ACTIVE);
if (sc->sc_mem_res == NULL)
@@ -446,7 +449,7 @@ pl310_attach(device_t dev)
static device_method_t pl310_methods[] = {
DEVMETHOD(device_probe, pl310_probe),
DEVMETHOD(device_attach, pl310_attach),
- {0, 0},
+ DEVMETHOD_END
};
static driver_t pl310_driver = {
More information about the svn-src-head
mailing list