[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC 10/24] xen/dts: Remove device_get_reg call in process_memory_node



The function device_get_reg will be removed in a future patch.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/common/device_tree.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 95635f0..ea01a5a 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -385,7 +385,7 @@ static void __init process_memory_node(const void *fdt, int 
node,
     const struct fdt_property *prop;
     int i;
     int banks;
-    const u32 *cell;
+    const __be32 *cell;
     paddr_t start, size;
 
     if ( address_cells < 1 || size_cells < 1 )
@@ -402,12 +402,13 @@ static void __init process_memory_node(const void *fdt, 
int node,
         return;
     }
 
-    cell = (const u32 *)prop->data;
+    cell = (const __be32 *)prop->data;
     banks = device_tree_nr_reg_ranges(prop, address_cells, size_cells);
 
     for ( i = 0; i < banks && early_info.mem.nr_banks < NR_MEM_BANKS; i++ )
     {
-        device_tree_get_reg(&cell, address_cells, size_cells, &start, &size);
+        start = dt_next_cell(address_cells, &cell);
+        size = dt_next_cell(size_cells, &cell);
         early_info.mem.bank[early_info.mem.nr_banks].start = start;
         early_info.mem.bank[early_info.mem.nr_banks].size = size;
         early_info.mem.nr_banks++;
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.