commit
d51aae6423
@ -0,0 +1,14 @@ |
||||
/*
|
||||
* Renesas SuperH MMCIF driver. |
||||
* |
||||
* Copyright (C) 2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> |
||||
* Copyright (C) 2014 Renesas Electronics Corporation |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0 |
||||
*/ |
||||
#ifndef _RMOBILE_MMC_H_ |
||||
#define _RMOBILE_MMC_H_ |
||||
|
||||
int mmcif_mmc_init(void); |
||||
|
||||
#endif /* _RMOBILE_MMC_H_ */ |
@ -0,0 +1,109 @@ |
||||
/*
|
||||
* arch/arm/include/asm/arch-rmobile/rcar-mstp.h |
||||
* |
||||
* Copyright (C) 2013, 2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> |
||||
* Copyright (C) 2013, 2014 Renesas Electronics Corporation |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0 |
||||
*/ |
||||
|
||||
#ifndef __ASM_ARCH_RCAR_MSTP_H |
||||
#define __ASM_ARCH_RCAR_MSTP_H |
||||
|
||||
#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_setclrbits(type, addr, set, clear) \ |
||||
out_##type((addr), (in_##type(addr) | (set)) & ~(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) |
||||
#define mstp_setclrbits_le32(addr, set, clear) \ |
||||
mstp_setclrbits(le32, addr, set, clear) |
||||
|
||||
#ifndef CONFIG_SMSTP0_ENA |
||||
#define CONFIG_SMSTP0_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP1_ENA |
||||
#define CONFIG_SMSTP1_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP2_ENA |
||||
#define CONFIG_SMSTP2_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP3_ENA |
||||
#define CONFIG_SMSTP3_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP4_ENA |
||||
#define CONFIG_SMSTP4_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP5_ENA |
||||
#define CONFIG_SMSTP5_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP6_ENA |
||||
#define CONFIG_SMSTP6_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP7_ENA |
||||
#define CONFIG_SMSTP7_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP8_ENA |
||||
#define CONFIG_SMSTP8_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP9_ENA |
||||
#define CONFIG_SMSTP9_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP10_ENA |
||||
#define CONFIG_SMSTP10_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_SMSTP11_ENA |
||||
#define CONFIG_SMSTP11_ENA 0x00 |
||||
#endif |
||||
|
||||
#ifndef CONFIG_RMSTP0_ENA |
||||
#define CONFIG_RMSTP0_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP1_ENA |
||||
#define CONFIG_RMSTP1_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP2_ENA |
||||
#define CONFIG_RMSTP2_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP3_ENA |
||||
#define CONFIG_RMSTP3_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP4_ENA |
||||
#define CONFIG_RMSTP4_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP5_ENA |
||||
#define CONFIG_RMSTP5_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP6_ENA |
||||
#define CONFIG_RMSTP6_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP7_ENA |
||||
#define CONFIG_RMSTP7_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP8_ENA |
||||
#define CONFIG_RMSTP8_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP9_ENA |
||||
#define CONFIG_RMSTP9_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP10_ENA |
||||
#define CONFIG_RMSTP10_ENA 0x00 |
||||
#endif |
||||
#ifndef CONFIG_RMSTP11_ENA |
||||
#define CONFIG_RMSTP11_ENA 0x00 |
||||
#endif |
||||
|
||||
struct mstp_ctl { |
||||
u32 s_addr; |
||||
u32 s_dis; |
||||
u32 s_ena; |
||||
u32 r_addr; |
||||
u32 r_dis; |
||||
u32 r_ena; |
||||
}; |
||||
|
||||
#endif /* __ASM_ARCH_RCAR_MSTP_H */ |
@ -0,0 +1,59 @@ |
||||
/*
|
||||
* board/renesas/rcar-gen2-common/common.c |
||||
* |
||||
* Copyright (C) 2013 Renesas Electronics Corporation |
||||
* Copyright (C) 2013 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> |
||||
* |
||||
* SPDX-License-Identifier: GPL-2.0 |
||||
*/ |
||||
|
||||
#include <common.h> |
||||
#include <asm/io.h> |
||||
#include <asm/arch/sys_proto.h> |
||||
#include <asm/arch/rmobile.h> |
||||
#include <asm/arch/rcar-mstp.h> |
||||
|
||||
#define TSTR0 0x04 |
||||
#define TSTR0_STR0 0x01 |
||||
|
||||
static struct mstp_ctl mstptbl[] = { |
||||
{ SMSTPCR0, MSTP0_BITS, CONFIG_SMSTP0_ENA, |
||||
RMSTPCR0, MSTP0_BITS, CONFIG_RMSTP0_ENA }, |
||||
{ SMSTPCR1, MSTP1_BITS, CONFIG_SMSTP1_ENA, |
||||
RMSTPCR1, MSTP1_BITS, CONFIG_RMSTP1_ENA }, |
||||
{ SMSTPCR2, MSTP2_BITS, CONFIG_SMSTP2_ENA, |
||||
RMSTPCR2, MSTP2_BITS, CONFIG_RMSTP2_ENA }, |
||||
{ SMSTPCR3, MSTP3_BITS, CONFIG_SMSTP3_ENA, |
||||
RMSTPCR3, MSTP3_BITS, CONFIG_RMSTP3_ENA }, |
||||
{ SMSTPCR4, MSTP4_BITS, CONFIG_SMSTP4_ENA, |
||||
RMSTPCR4, MSTP4_BITS, CONFIG_RMSTP4_ENA }, |
||||
{ SMSTPCR5, MSTP5_BITS, CONFIG_SMSTP5_ENA, |
||||
RMSTPCR5, MSTP5_BITS, CONFIG_RMSTP5_ENA }, |
||||
/* No MSTP6 */ |
||||
{ SMSTPCR7, MSTP7_BITS, CONFIG_SMSTP7_ENA, |
||||
RMSTPCR7, MSTP7_BITS, CONFIG_RMSTP7_ENA }, |
||||
{ SMSTPCR8, MSTP8_BITS, CONFIG_SMSTP8_ENA, |
||||
RMSTPCR8, MSTP8_BITS, CONFIG_RMSTP8_ENA }, |
||||
{ SMSTPCR9, MSTP9_BITS, CONFIG_SMSTP9_ENA, |
||||
RMSTPCR9, MSTP9_BITS, CONFIG_RMSTP9_ENA }, |
||||
{ SMSTPCR10, MSTP10_BITS, CONFIG_SMSTP10_ENA, |
||||
RMSTPCR10, MSTP10_BITS, CONFIG_RMSTP10_ENA }, |
||||
{ SMSTPCR11, MSTP11_BITS, CONFIG_SMSTP1_ENA, |
||||
RMSTPCR11, MSTP11_BITS, CONFIG_RMSTP11_ENA }, |
||||
}; |
||||
|
||||
void arch_preboot_os(void) |
||||
{ |
||||
int i; |
||||
|
||||
/* stop TMU0 */ |
||||
mstp_clrbits_le32(TMU_BASE + TSTR0, TMU_BASE + TSTR0, TSTR0_STR0); |
||||
|
||||
/* Stop module clock */ |
||||
for (i = 0; i < ARRAY_SIZE(mstptbl); i++) { |
||||
mstp_setclrbits_le32(mstptbl[i].s_addr, mstptbl[i].s_dis, |
||||
mstptbl[i].s_ena); |
||||
mstp_setclrbits_le32(mstptbl[i].r_addr, mstptbl[i].r_dis, |
||||
mstptbl[i].r_ena); |
||||
} |
||||
} |
Loading…
Reference in new issue