Re: [U-Boot] [PATCH 1/5] sh: Add macros for SH-4A 32-Bit Address Extended Mode

2009-02-27 Thread Nobuhiro Iwamatsu
On Wed, 25 Feb 2009 14:26:37 +0900
Yoshihiro Shimoda shimoda.yoshih...@renesas.com wrote:

 +#if defined(CONFIG_SH_32BIT)
 +#define PMB_ADDR_BASE(entry) (0xf610 + (entry  8))
 +#define PMB_DATA_BASE(entry) (0xf710 + (entry  8))
 +#define mk_pmb_addr_val(vpn) ((vpn  24))
 +#define mk_pmb_data_val(ppn, ub, v, sz1, sz0, c, wt) \
 + ((ppn  24) | (ub  9) | (v  8) | \
 +  (sz1  7) | (sz0  4) | (c  3) | wt)
 +#endif
Please use macro.

Best regards,
 Nobuhiro

-- 
Nobuhiro Iwamatsu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/5] sh: Add macros for SH-4A 32-Bit Address Extended Mode

2009-02-24 Thread Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda shimoda.yoshih...@renesas.com
---
 include/asm-sh/cpu_sh4.h |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/asm-sh/cpu_sh4.h b/include/asm-sh/cpu_sh4.h
index d2dbfcd..7c6c6ae 100644
--- a/include/asm-sh/cpu_sh4.h
+++ b/include/asm-sh/cpu_sh4.h
@@ -54,4 +54,13 @@
 # error Unknown SH4 variant
 #endif

+#if defined(CONFIG_SH_32BIT)
+#define PMB_ADDR_BASE(entry)   (0xf610 + (entry  8))
+#define PMB_DATA_BASE(entry)   (0xf710 + (entry  8))
+#define mk_pmb_addr_val(vpn)   ((vpn  24))
+#define mk_pmb_data_val(ppn, ub, v, sz1, sz0, c, wt)   \
+   ((ppn  24) | (ub  9) | (v  8) | \
+(sz1  7) | (sz0  4) | (c  3) | wt)
+#endif
+
 #endif /* _ASM_CPU_SH4_H_ */
-- 
1.5.5


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot