From: Fu Wei <fu.wei@linaro.org>
To: grub-devel@gnu.org, Leif Lindholm <leif.lindholm@linaro.org>,
Ian Campbell <Ian.Campbell@citrix.com>
Cc: Roy Franz <roy.franz@linaro.org>, Jon Masters <jcm@redhat.com>,
linaro-uefi <linaro-uefi@lists.linaro.org>
Subject: [PATCH 1/5] Add grub_fdt_set_reg64 macro into fdt.h header file for
Date: Fri, 19 Dec 2014 01:59:30 +0800 [thread overview]
Message-ID: <54931602.9070807@linaro.org> (raw)
inserting "reg" properiy, while #address-cells = <0x2> and #size-cells = <0x2>
Signed-off-by: Fu Wei <fu.wei@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
include/grub/fdt.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/grub/fdt.h b/include/grub/fdt.h
index 3016998..fdfca75 100644
--- a/include/grub/fdt.h
+++ b/include/grub/fdt.h
@@ -117,4 +117,16 @@ int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name,
grub_fdt_set_prop ((fdt), (nodeoffset), (name), &_val, 8); \
})
+/* Setup "reg" property for
+ * #address-cells = <0x2>
+ * #size-cells = <0x2>
+ */
+#define grub_fdt_set_reg64(fdt, nodeoffset, addr, size) \
+({ \
+ grub_uint64_t reg_64[2]; \
+ reg_64[0] = grub_cpu_to_be64(addr); \
+ reg_64[1] = grub_cpu_to_be64(size); \
+ grub_fdt_set_prop ((fdt), (nodeoffset), "reg", reg_64, 16); \
+})
+
#endif /* ! GRUB_FDT_HEADER */
--
1.8.3.1
reply other threads:[~2014-12-18 17:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=54931602.9070807@linaro.org \
--to=fu.wei@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=grub-devel@gnu.org \
--cc=jcm@redhat.com \
--cc=leif.lindholm@linaro.org \
--cc=linaro-uefi@lists.linaro.org \
--cc=roy.franz@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.