xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
To: xen-devel@lists.xen.org
Cc: ian.campbell@citrix.com, Anup Patel <anup.patel@linaro.org>,
	patches@linaro.org, patches@apm.com,
	stefano.stabellini@citrix.com,
	Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Subject: [PATCH] xen: arm: platforms: Remove determining reset specific values from dts for XGENE.
Date: Tue,  4 Feb 2014 11:35:32 +0530	[thread overview]
Message-ID: <1391493932-31268-1-git-send-email-pranavkumar@linaro.org> (raw)

This patch removes reading reset specific values (address, size and mask) from dts
and uses values defined in the code now.
This is because currently xgene reset driver (submitted in linux) is going through
a change (which is not yet accepted), this new driver has a new type of dts bindings
for reset.
Hence till linux driver comes to some conclusion, we will use hardcoded values instead
of reading from dts so that xen code will not break due to the linux transition.

Ref:
http://lists.xen.org/archives/html/xen-devel/2014-01/msg02256.html
http://www.gossamer-threads.com/lists/linux/kernel/1845585

Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Anup Patel <anup.patel@linaro.org>
---
 xen/arch/arm/platforms/xgene-storm.c |   43 +++++++++-------------------------
 1 file changed, 11 insertions(+), 32 deletions(-)

diff --git a/xen/arch/arm/platforms/xgene-storm.c b/xen/arch/arm/platforms/xgene-storm.c
index 4fc185b..1da9b36 100644
--- a/xen/arch/arm/platforms/xgene-storm.c
+++ b/xen/arch/arm/platforms/xgene-storm.c
@@ -25,6 +25,11 @@
 #include <asm/io.h>
 #include <asm/gic.h>
 
+/* XGENE RESET Specific defines */
+#define XGENE_RESET_ADDR        0x17000014UL
+#define XGENE_RESET_SIZE        0x100
+#define XGENE_RESET_MASK        0x1
+
 /* Variables to save reset address of soc during platform initialization. */
 static u64 reset_addr, reset_size;
 static u32 reset_mask;
@@ -141,38 +146,12 @@ static void xgene_storm_reset(void)
 
 static int xgene_storm_init(void)
 {
-    static const struct dt_device_match reset_ids[] __initconst =
-    {
-        DT_MATCH_COMPATIBLE("apm,xgene-reboot"),
-        {},
-    };
-    struct dt_device_node *dev;
-    int res;
-
-    dev = dt_find_matching_node(NULL, reset_ids);
-    if ( !dev )
-    {
-        printk("XGENE: Unable to find a compatible reset node in the device tree");
-        return 0;
-    }
-
-    dt_device_set_used_by(dev, DOMID_XEN);
-
-    /* Retrieve base address and size */
-    res = dt_device_get_address(dev, 0, &reset_addr, &reset_size);
-    if ( res )
-    {
-        printk("XGENE: Unable to retrieve the base address for reset\n");
-        return 0;
-    }
-
-    /* Get reset mask */
-    res = dt_property_read_u32(dev, "mask", &reset_mask);
-    if ( !res )
-    {
-        printk("XGENE: Unable to retrieve the reset mask\n");
-        return 0;
-    }
+    /* TBD: Once Linux side device tree bindings are finalized retrieve
+     * these values from dts.
+     */
+    reset_addr = XGENE_RESET_ADDR;
+    reset_size = XGENE_RESET_SIZE;
+    reset_mask = XGENE_RESET_MASK;
 
     reset_vals_valid = true;
     return 0;
-- 
1.7.9.5

             reply	other threads:[~2014-02-04  6:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04  6:05 Pranavkumar Sawargaonkar [this message]
2014-02-04  9:43 ` [PATCH] xen: arm: platforms: Remove determining reset specific values from dts for XGENE Ian Campbell
2014-02-05 14:57   ` George Dunlap
2014-02-05 15:01     ` Ian Campbell
2014-02-06 12:40     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391493932-31268-1-git-send-email-pranavkumar@linaro.org \
    --to=pranavkumar@linaro.org \
    --cc=anup.patel@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=patches@apm.com \
    --cc=patches@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).