diff options
author | Scott Wood <scottwood@freescale.com> | 2007-08-21 03:40:02 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-08-22 15:37:09 +1000 |
commit | e5d8d54db25790524da34b0143f4e0176fb7677b (patch) | |
tree | 5424562c9dd166eadd10b58d38ea9b3ce1a68ae0 /arch/powerpc/boot/ops.h | |
parent | 0b195812dfbccc2ac33e17b35b899dd4fea7611f (diff) |
[POWERPC] bootwrapper: Add PowerQUICC II (82xx with CPM) cuboot support
This allows booting on legacy, non-device-tree aware versions of U-boot.
It also fixes up the hardware to match the PCI and chipselect information
in the device tree, as u-boot is inconsistent in setting these up
correctly (or at all).
Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/ops.h')
-rw-r--r-- | arch/powerpc/boot/ops.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index e4b6139d2d6..45c2268d5c5 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h @@ -89,6 +89,7 @@ extern void flush_cache(void *, unsigned long); 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); static inline void *finddevice(const char *name) { @@ -206,4 +207,12 @@ extern char _initrd_end[]; extern char _dtb_start[]; extern char _dtb_end[]; +static inline __attribute__((const)) +int __ilog2_u32(u32 n) +{ + int bit; + asm ("cntlzw %0,%1" : "=r" (bit) : "r" (n)); + return 31 - bit; +} + #endif /* _PPC_BOOT_OPS_H_ */ |