blob: f5b42faea418aff5857849810172f824f3fd677b [file] [log] [blame]
Nobuhiro Iwamatsu73f35e02012-08-21 13:14:46 +09001/*
2 * Copyright (C) 2012 Renesas Solutions Corp.
3 *
4 * See file CREDITS for list of people who contributed to this
5 * project.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23#ifndef __SH_TMU_H
24#define __SH_TMU_H
25
26#include <asm/types.h>
27
28#if defined(CONFIG_SH3)
29struct tmu_regs {
30 u8 tocr;
31 u8 reserved0;
32 u8 tstr;
33 u8 reserved1;
34 u32 tcor0;
35 u32 tcnt0;
36 u16 tcr0;
37 u16 reserved2;
38 u32 tcor1;
39 u32 tcnt1;
40 u16 tcr1;
41 u16 reserved3;
42 u32 tcor2;
43 u32 tcnt2;
44 u16 tcr2;
45 u16 reserved4;
46 u32 tcpr2;
47};
48#endif /* CONFIG_SH3 */
49
Nobuhiro Iwamatsu2c541df2012-08-03 14:21:05 +090050#if defined(CONFIG_SH4) || defined(CONFIG_SH4A) || defined(CONFIG_RMOBILE)
Nobuhiro Iwamatsu73f35e02012-08-21 13:14:46 +090051struct tmu_regs {
52 u32 reserved;
53 u8 tstr;
54 u8 reserved2[3];
55 u32 tcor0;
56 u32 tcnt0;
57 u16 tcr0;
58 u16 reserved3;
59 u32 tcor1;
60 u32 tcnt1;
61 u16 tcr1;
62 u16 reserved4;
63 u32 tcor2;
64 u32 tcnt2;
65 u16 tcr2;
66 u16 reserved5;
67};
68#endif /* CONFIG_SH4 */
69
70static inline unsigned long get_tmu0_clk_rate(void)
71{
Nobuhiro Iwamatsu857febf2013-08-20 11:40:24 +090072 return CONFIG_SH_TMU_CLK_FREQ;
Nobuhiro Iwamatsu73f35e02012-08-21 13:14:46 +090073}
74
75#endif /* __SH_TMU_H */