Re: [PATCH 1/8] Add support for multiple memory resources.

2017-07-04 Thread Sichen Zhao
Ok,  i will remove patch 5/8 and 6/8. Is that ok?

Best Regards
Sichen Zhao


From: devel <devel-boun...@rtems.org> on behalf of Sebastian Huber 
<sebastian.hu...@embedded-brains.de>
Sent: Wednesday, July 5, 2017 13:17
To: Sichen Zhao; devel@rtems.org
Cc: punitv...@gmail.com; christian.maude...@embedded-brains.de
Subject: Re: [PATCH 1/8] Add support for multiple memory resources.

Hello Sichen,

could you please create a minimal patch set that works with the FDT
enabled BSP.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/8] Add support for multiple memory resources.

2017-07-04 Thread Sebastian Huber

Hello Sichen,

could you please create a minimal patch set that works with the FDT 
enabled BSP.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 1/8] Add support for multiple memory resources.

2017-07-04 Thread Sichen Zhao
From: Hans Petter Selasky 

---
 rtemsbsd/rtems/rtems-kernel-nexus.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/rtemsbsd/rtems/rtems-kernel-nexus.c 
b/rtemsbsd/rtems/rtems-kernel-nexus.c
index 008e4b2..1a5a9ef 100644
--- a/rtemsbsd/rtems/rtems-kernel-nexus.c
+++ b/rtemsbsd/rtems/rtems-kernel-nexus.c
@@ -131,7 +131,7 @@ nexus_probe(device_t dev)
 }
 
 static bool
-nexus_get_start(const rtems_bsd_device *nd, int type, rman_res_t *start)
+nexus_get_start(const rtems_bsd_device *nd, int type, int rid, rman_res_t 
*start)
 {
u_long sr = (u_long)*start;
size_t i;
@@ -140,6 +140,8 @@ nexus_get_start(const rtems_bsd_device *nd, int type, 
rman_res_t *start)
const rtems_bsd_device_resource *dr = >resources[i];
 
if (dr->type == type && dr->start_request == sr) {
+   if(rid--)
+   continue;
*start = dr->start_actual;
 
return (true);
@@ -176,7 +178,7 @@ nexus_alloc_resource(device_t bus, device_t child, int 
type, int *rid,
SET_FOREACH(nd, nexus) {
if (strcmp(device_get_name(child), nd->name) == 0
&& device_get_unit(child) == nd->unit) {
-   if (nexus_get_start(nd, type, )) {
+   if (nexus_get_start(nd, type, *rid, )) {
res = rman_reserve_resource(rm, start, end,
count, flags, child);
if (res != NULL) {
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel