[PATCH 2/6] Modify the support for multiple memory resources.

Sichen Zhao 1473996754 at qq.com
Tue Jul 11 10:53:18 UTC 2017


rtems-libbsd only support single resource for a device.
But some usb control need two resources, such as musb.
So modify support for multiple device resources allocation.
---
 rtemsbsd/rtems/rtems-kernel-nexus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rtemsbsd/rtems/rtems-kernel-nexus.c b/rtemsbsd/rtems/rtems-kernel-nexus.c
index 1a5a9ef..35e56ee 100644
--- a/rtemsbsd/rtems/rtems-kernel-nexus.c
+++ b/rtemsbsd/rtems/rtems-kernel-nexus.c
@@ -139,7 +139,7 @@ nexus_get_start(const rtems_bsd_device *nd, int type, int rid, rman_res_t *start
 	for (i = 0; i < nd->resource_count; ++i) {
 		const rtems_bsd_device_resource *dr = &nd->resources[i];
 
-		if (dr->type == type && dr->start_request == sr) {
+		if (dr->type == type && dr->start_request >= sr) {
 			if(rid--)
 			    continue;
 			*start = dr->start_actual;
-- 
2.7.4






More information about the devel mailing list