From da0a5f0c65913e4ec0a70a5019ce0a7bcaab21c9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 10 Apr 2008 17:03:04 +0200 Subject: [POWERPC] Add bootwrapper function to get virtual reg from the device tree. This patch adds a new generic device tree processing function that retrieves virtual reg addresses from the device tree to the bootwrapper code. It also updates the bootwrapper code to use the new function. dt_get_virtual_reg() retrieves the virtual reg addresses from the "virtual-reg" property. If the property can't be found, it uses the "reg" property and walks the tree to translate it to absolute addresses. Signed-off-by: Laurent Pinchart Acked-by: Scott Wood Signed-off-by: Kumar Gala --- arch/powerpc/boot/ops.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/powerpc/boot/ops.h') diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 4b0544b03c64..321e2f5afe71 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h @@ -95,6 +95,7 @@ int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size); int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr); int dt_is_compatible(void *node, const char *compat); void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize); +int dt_get_virtual_reg(void *node, void **addr, int nres); static inline void *finddevice(const char *name) { -- cgit v1.2.3