Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/imx Use PMAP_NOCACHE, add stream methods.
details: https://anonhg.NetBSD.org/src/rev/04af225785aa
branches: trunk
changeset: 781318:04af225785aa
user: matt <matt%NetBSD.org@localhost>
date: Sat Sep 01 00:06:54 2012 +0000
description:
Use PMAP_NOCACHE, add stream methods.
diffstat:
sys/arch/arm/imx/imx_space.c | 53 ++++++++++++++++++++++++++++++++++---------
1 files changed, 42 insertions(+), 11 deletions(-)
diffs (76 lines):
diff -r 2e37ccb1278f -r 04af225785aa sys/arch/arm/imx/imx_space.c
--- a/sys/arch/arm/imx/imx_space.c Sat Sep 01 00:05:36 2012 +0000
+++ b/sys/arch/arm/imx/imx_space.c Sat Sep 01 00:06:54 2012 +0000
@@ -1,7 +1,7 @@
-/* $Id: imx_space.c,v 1.3 2011/07/01 20:27:50 dyoung Exp $ */
+/* $Id: imx_space.c,v 1.4 2012/09/01 00:06:54 matt Exp $ */
/* derived from: */
-/* $NetBSD: imx_space.c,v 1.3 2011/07/01 20:27:50 dyoung Exp $ */
+/* $NetBSD: imx_space.c,v 1.4 2012/09/01 00:06:54 matt Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -162,6 +162,44 @@
generic_armv4_bs_c_2,
bs_notimpl_bs_c_4,
bs_notimpl_bs_c_8,
+
+#ifdef __BUS_SPACE_HAS_STREAM_METHODS
+ /* read (single) */
+ generic_bs_r_1,
+ generic_armv4_bs_r_2,
+ generic_bs_r_4,
+ bs_notimpl_bs_r_8,
+
+ /* read multiple */
+ generic_bs_rm_1,
+ generic_armv4_bs_rm_2,
+ generic_bs_rm_4,
+ bs_notimpl_bs_rm_8,
+
+ /* read region */
+ generic_bs_rr_1,
+ generic_armv4_bs_rr_2,
+ generic_bs_rr_4,
+ bs_notimpl_bs_rr_8,
+
+ /* write (single) */
+ generic_bs_w_1,
+ generic_armv4_bs_w_2,
+ generic_bs_w_4,
+ bs_notimpl_bs_w_8,
+
+ /* write multiple */
+ generic_bs_wm_1,
+ generic_armv4_bs_wm_2,
+ generic_bs_wm_4,
+ bs_notimpl_bs_wm_8,
+
+ /* write region */
+ generic_bs_wr_1,
+ generic_armv4_bs_wr_2,
+ generic_bs_wr_4,
+ bs_notimpl_bs_wr_8,
+#endif
};
int
@@ -192,15 +230,8 @@
*bshp = (bus_space_handle_t)(va + (bpa - startpa));
for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
- pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE, 0);
- if ((flag & BUS_SPACE_MAP_CACHEABLE) == 0) {
- pte = vtopte(va);
- *pte &= ~L2_S_CACHE_MASK;
- PTE_SYNC(pte);
- /* XXX: pmap_kenter_pa() also does PTE_SYNC(). a bit of
- * waste.
- */
- }
+ pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE,
+ (flag & BUS_SPACE_MAP_CACHEABLE) ? 0 : PMAP_NOCACHE);
}
pmap_update(pmap_kernel());
Home |
Main Index |
Thread Index |
Old Index