summaryrefslogtreecommitdiff
path: root/board/renesas
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2014-12-02 16:52:19 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2014-12-05 11:04:13 +0900
commit44e1eebf86efc917010b8fd482951b10c3b06453 (patch)
tree6e9268d51ef11b68f81165f442360c98d808a374 /board/renesas
parentaaa717ebdec1859c263ba0a25afab255e8ab6038 (diff)
downloadu-boot-imx-44e1eebf86efc917010b8fd482951b10c3b06453.zip
u-boot-imx-44e1eebf86efc917010b8fd482951b10c3b06453.tar.gz
u-boot-imx-44e1eebf86efc917010b8fd482951b10c3b06453.tar.bz2
arm: rmobile: rcar: Move control macro of mstp to arch-rmobile/rcar-mstp.h
Control macro of mstp is common in R-Car ARM SoC (r8a7790, r8a7791, r8a7793 and r8a7794). This moves these to arch-rmobile/rcar-mstp.h Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'board/renesas')
-rw-r--r--board/renesas/alt/alt.c10
-rw-r--r--board/renesas/gose/gose.c10
-rw-r--r--board/renesas/koelsch/koelsch.c10
-rw-r--r--board/renesas/lager/lager.c10
4 files changed, 4 insertions, 36 deletions
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index bf90f2e..e3cfe54 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -15,6 +15,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
#include <netdev.h>
#include <miiphy.h>
#include <i2c.h>
@@ -42,15 +43,6 @@ void s_init(void)
#define ETHER_MSTP813 (1 << 13)
#define IIC1_MSTP323 (1 << 23)
-#define mstp_setbits(type, addr, saddr, set) \
- out_##type((saddr), in_##type(addr) | (set))
-#define mstp_clrbits(type, addr, saddr, clear) \
- out_##type((saddr), in_##type(addr) & ~(clear))
-#define mstp_setbits_le32(addr, saddr, set) \
- mstp_setbits(le32, addr, saddr, set)
-#define mstp_clrbits_le32(addr, saddr, clear) \
- mstp_clrbits(le32, addr, saddr, clear)
-
int board_early_init_f(void)
{
/* TMU */
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index bb6849e..0b2d904 100644
--- a/board/renesas/gose/gose.c
+++ b/board/renesas/gose/gose.c
@@ -15,6 +15,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
#include <netdev.h>
#include <miiphy.h>
#include <i2c.h>
@@ -45,15 +46,6 @@ void s_init(void)
#define SCIF0_MSTP721 (1 << 21)
#define ETHER_MSTP813 (1 << 13)
-#define mstp_setbits(type, addr, saddr, set) \
- out_##type((saddr), in_##type(addr) | (set))
-#define mstp_clrbits(type, addr, saddr, clear) \
- out_##type((saddr), in_##type(addr) & ~(clear))
-#define mstp_setbits_le32(addr, saddr, set) \
- mstp_setbits(le32, addr, saddr, set)
-#define mstp_clrbits_le32(addr, saddr, clear) \
- mstp_clrbits(le32, addr, saddr, clear)
-
int board_early_init_f(void)
{
/* TMU0 */
diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index 14d1770..5ebbfcf 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -16,6 +16,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
#include <netdev.h>
#include <miiphy.h>
#include <i2c.h>
@@ -47,15 +48,6 @@ void s_init(void)
#define SCIF0_MSTP721 (1 << 21)
#define ETHER_MSTP813 (1 << 13)
-#define mstp_setbits(type, addr, saddr, set) \
- out_##type((saddr), in_##type(addr) | (set))
-#define mstp_clrbits(type, addr, saddr, clear) \
- out_##type((saddr), in_##type(addr) & ~(clear))
-#define mstp_setbits_le32(addr, saddr, set) \
- mstp_setbits(le32, addr, saddr, set)
-#define mstp_clrbits_le32(addr, saddr, clear) \
- mstp_clrbits(le32, addr, saddr, clear)
-
int board_early_init_f(void)
{
mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index 23ef194..47cf51b 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -18,6 +18,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/gpio.h>
#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
#include <miiphy.h>
#include <i2c.h>
#include "qos.h"
@@ -54,15 +55,6 @@ void s_init(void)
#define SCIF0_MSTP721 (1 << 21)
#define ETHER_MSTP813 (1 << 13)
-#define mstp_setbits(type, addr, saddr, set) \
- out_##type((saddr), in_##type(addr) | (set))
-#define mstp_clrbits(type, addr, saddr, clear) \
- out_##type((saddr), in_##type(addr) & ~(clear))
-#define mstp_setbits_le32(addr, saddr, set) \
- mstp_setbits(le32, addr, saddr, set)
-#define mstp_clrbits_le32(addr, saddr, clear) \
- mstp_clrbits(le32, addr, saddr, clear)
-
int board_early_init_f(void)
{
/* TMU0 */