* [U-Boot] [PATCH 1/5] sh: Add macros for SH-4A 32-Bit Address Extended Mode
@ 2009-02-25 5:26 Yoshihiro Shimoda
2009-02-27 9:20 ` Nobuhiro Iwamatsu
0 siblings, 1 reply; 2+ messages in thread
From: Yoshihiro Shimoda @ 2009-02-25 5:26 UTC (permalink / raw)
To: u-boot
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@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) (0xf6100000 + (entry << 8))
+#define PMB_DATA_BASE(entry) (0xf7100000 + (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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH 1/5] sh: Add macros for SH-4A 32-Bit Address Extended Mode
2009-02-25 5:26 [U-Boot] [PATCH 1/5] sh: Add macros for SH-4A 32-Bit Address Extended Mode Yoshihiro Shimoda
@ 2009-02-27 9:20 ` Nobuhiro Iwamatsu
0 siblings, 0 replies; 2+ messages in thread
From: Nobuhiro Iwamatsu @ 2009-02-27 9:20 UTC (permalink / raw)
To: u-boot
On Wed, 25 Feb 2009 14:26:37 +0900
Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> wrote:
> +#if defined(CONFIG_SH_32BIT)
> +#define PMB_ADDR_BASE(entry) (0xf6100000 + (entry << 8))
> +#define PMB_DATA_BASE(entry) (0xf7100000 + (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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-27 9:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 5:26 [U-Boot] [PATCH 1/5] sh: Add macros for SH-4A 32-Bit Address Extended Mode Yoshihiro Shimoda
2009-02-27 9:20 ` Nobuhiro Iwamatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox