aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/dpaa
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2016-05-25 01:23:19 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2016-05-25 01:23:19 +0000
commit0e9f21dc24e4846a711fe56c898b6991f28f0f02 (patch)
treed8297622ff2283a2e36a3ef15335f33c19061ca6 /sys/dev/dpaa
parent5fb70b0cae612137a96d02503ac2d373250f1762 (diff)
downloadsrc-0e9f21dc24e4846a711fe56c898b6991f28f0f02.tar.gz
src-0e9f21dc24e4846a711fe56c898b6991f28f0f02.zip
Notes
Diffstat (limited to 'sys/dev/dpaa')
-rw-r--r--sys/dev/dpaa/portals_common.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/dpaa/portals_common.c b/sys/dev/dpaa/portals_common.c
index 7c7408d2e24d..207fcbdc6dbd 100644
--- a/sys/dev/dpaa/portals_common.c
+++ b/sys/dev/dpaa/portals_common.c
@@ -76,9 +76,12 @@ dpaa_portal_alloc_res(device_t dev, struct dpaa_portals_devinfo *di, int cpu)
SYS_RES_MEMORY, &sc->sc_rrid[0], rle->start + sc->sc_dp_pa,
rle->end + sc->sc_dp_pa, rle->count, RF_ACTIVE);
if (sc->sc_rres[0] == NULL) {
- device_printf(dev, "Could not allocate memory.\n");
+ device_printf(dev,
+ "Could not allocate cache enabled memory.\n");
return (ENXIO);
}
+ tlb1_set_entry(rman_get_bushandle(sc->sc_rres[0]),
+ rle->start + sc->sc_dp_pa, rle->count, _TLB_ENTRY_MEM);
/* Cache inhibited area */
rle = resource_list_find(res, SYS_RES_MEMORY, 1);
sc->sc_rrid[1] = 1;
@@ -86,11 +89,15 @@ dpaa_portal_alloc_res(device_t dev, struct dpaa_portals_devinfo *di, int cpu)
SYS_RES_MEMORY, &sc->sc_rrid[1], rle->start + sc->sc_dp_pa,
rle->end + sc->sc_dp_pa, rle->count, RF_ACTIVE);
if (sc->sc_rres[1] == NULL) {
- device_printf(dev, "Could not allocate memory.\n");
+ device_printf(dev,
+ "Could not allocate cache inhibited memory.\n");
bus_release_resource(dev, SYS_RES_MEMORY,
sc->sc_rrid[0], sc->sc_rres[0]);
return (ENXIO);
}
+ tlb1_set_entry(rman_get_bushandle(sc->sc_rres[1]),
+ rle->start + sc->sc_dp_pa, rle->count, _TLB_ENTRY_IO);
+ sc->sc_dp[cpu].dp_regs_mapped = 1;
}
/* Acquire portal's CE_PA and CI_PA */
rle = resource_list_find(res, SYS_RES_MEMORY, 0);