From patchwork Fri Aug 16 21:05:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19258 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 33319248E6 for ; Fri, 16 Aug 2013 21:06:24 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r13sf1880699ghr.5 for ; Fri, 16 Aug 2013 14:06:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Io+GmPWdEQs5FZ2nYArZk73/CHPWPZzCZom+gjjVl2I=; b=HD/HxQP8MxkiVyW+HQ5uifxg5HdOM0FfyA0omf+qtlN8KLMN7eUlWsLsXzEVfMAdXo HOj9VEp9eJm/C6yiDEAZRBZmWUEzirmuVUyxo+z8KHx6A9K3X+SmCHf5C8LxXQsdKKyF +RCNe2LtX2PYSc1ONdAtWVKqhKoe+GRt7BhDvpT2ue5h/tBcRzNrRRmjO5/LS4tkn2vf El8R/LyFPlhU8hGBOvo465KiIyjCL81oa+kSRcxKn4qH4+R9uDN7xopmgyYuA/IY1a2z 3w2JgsCEnYQCY1n3M9kbHLwWMizEHZqloNbQEf1ehml8aRSWQuDQaE0BhDAk0brRos0C j8dA== X-Received: by 10.236.156.138 with SMTP id m10mr1268808yhk.26.1376687183906; Fri, 16 Aug 2013 14:06:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.195 with SMTP id lm3ls971282qeb.89.gmail; Fri, 16 Aug 2013 14:06:23 -0700 (PDT) X-Received: by 10.220.74.69 with SMTP id t5mr2929770vcj.18.1376687183784; Fri, 16 Aug 2013 14:06:23 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id vf5si774534vdc.109.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 14:06:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id hz10so1767805vcb.40 for ; Fri, 16 Aug 2013 14:06:23 -0700 (PDT) X-Gm-Message-State: ALoCoQnzv7L6Hq01v62fFF/XAxMXuWsn5odaVZnVwNT1hOyPY8Dp4CU/0PWZAZSFPGWrKX/wAZwt X-Received: by 10.52.229.73 with SMTP id so9mr2488551vdc.27.1376687183647; Fri, 16 Aug 2013 14:06:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp89452vcz; Fri, 16 Aug 2013 14:06:23 -0700 (PDT) X-Received: by 10.180.36.176 with SMTP id r16mr569237wij.44.1376687182735; Fri, 16 Aug 2013 14:06:22 -0700 (PDT) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id bn3si245670wib.18.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 14:06:22 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.42; Received: by mail-wg0-f42.google.com with SMTP id j13so1646622wgh.5 for ; Fri, 16 Aug 2013 14:06:22 -0700 (PDT) X-Received: by 10.180.97.226 with SMTP id ed2mr626914wib.17.1376687182307; Fri, 16 Aug 2013 14:06:22 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id b13sm797327wic.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Aug 2013 14:06:21 -0700 (PDT) From: Julien Grall To: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com Cc: patches@linaro.org, andre.przywara@linaro.org, xen-devel@lists.xen.org, Julien Grall Subject: [RFC 10/24] xen/dts: Remove device_get_reg call in process_memory_node Date: Fri, 16 Aug 2013 22:05:42 +0100 Message-Id: <1376687156-6737-11-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1376687156-6737-1-git-send-email-julien.grall@linaro.org> References: <1376687156-6737-1-git-send-email-julien.grall@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The function device_get_reg will be removed in a future patch. Signed-off-by: Julien Grall --- 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++;