Nobuhiro Iwamatsu | a541344 | 2014-12-02 16:52:20 +0900 | [diff] [blame] | 1 | /* |
| 2 | * board/renesas/rcar-gen2-common/common.c |
| 3 | * |
| 4 | * Copyright (C) 2013 Renesas Electronics Corporation |
| 5 | * Copyright (C) 2013 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> |
| 6 | * |
| 7 | * SPDX-License-Identifier: GPL-2.0 |
| 8 | */ |
| 9 | |
| 10 | #include <common.h> |
| 11 | #include <asm/io.h> |
| 12 | #include <asm/arch/sys_proto.h> |
| 13 | #include <asm/arch/rmobile.h> |
| 14 | #include <asm/arch/rcar-mstp.h> |
| 15 | |
| 16 | #define TSTR0 0x04 |
| 17 | #define TSTR0_STR0 0x01 |
| 18 | |
| 19 | #define TMU0_MSTP125 (1 << 25) |
| 20 | void arch_preboot_os(void) |
| 21 | { |
| 22 | /* stop TMU0 */ |
| 23 | mstp_clrbits_le32(TMU_BASE + TSTR0, TMU_BASE + TSTR0, TSTR0_STR0); |
| 24 | |
| 25 | /* Disable TMU0 */ |
| 26 | mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125); |
| 27 | } |