Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/bhnd/cores/chipc/chipc_subr.c
Show First 20 Lines • Show All 467 Lines • ▼ Show 20 Lines | if (cr->cr_refs == 0) { | ||||
if ((cr->cr_res_rid = cr->cr_rid) == -1) { | if ((cr->cr_res_rid = cr->cr_rid) == -1) { | ||||
CHIPC_UNLOCK(sc); | CHIPC_UNLOCK(sc); | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
/* Allocate resource */ | /* Allocate resource */ | ||||
cr->cr_res = bhnd_alloc_resource(sc->dev, | cr->cr_res = bhnd_alloc_resource(sc->dev, | ||||
SYS_RES_MEMORY, &cr->cr_res_rid, cr->cr_addr, | SYS_RES_MEMORY, &cr->cr_res_rid, cr->cr_addr, | ||||
cr->cr_end, cr->cr_count, 0); | cr->cr_end, cr->cr_count, RF_SHAREABLE); | ||||
if (cr->cr_res == NULL) { | if (cr->cr_res == NULL) { | ||||
CHIPC_UNLOCK(sc); | CHIPC_UNLOCK(sc); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
} | } | ||||
/* Increment allocation refcount */ | /* Increment allocation refcount */ | ||||
cr->cr_refs++; | cr->cr_refs++; | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |