blob: ed7c243b3bdaddd01d2381f27f0316b6e9b92495 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +09002/*
Yusuke Goda54cda8b2008-03-05 14:23:26 +09003 * (C) Copyright 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +09004 */
5
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +09006#ifndef _ASM_CPU_SH4_H_
7#define _ASM_CPU_SH4_H_
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +09008
9/* cache control */
10#define CCR_CACHE_STOP 0x00000808
11#define CCR_CACHE_ENABLE 0x00000101
12#define CCR_CACHE_ICI 0x00000800
13
14#define CACHE_OC_ADDRESS_ARRAY 0xf4000000
Nobuhiro Iwamatsu121e2c52008-11-25 11:05:19 +090015
16#if defined (CONFIG_CPU_SH7750) || \
17 defined(CONFIG_CPU_SH7751)
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090018#define CACHE_OC_WAY_SHIFT 14
19#define CACHE_OC_NUM_ENTRIES 512
Nobuhiro Iwamatsu121e2c52008-11-25 11:05:19 +090020#else
21#define CACHE_OC_WAY_SHIFT 13
22#define CACHE_OC_NUM_ENTRIES 256
23#endif
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090024#define CACHE_OC_ENTRY_SHIFT 5
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090025
Nobuhiro Iwamatsu53b31432008-03-12 12:10:28 +090026#if defined (CONFIG_CPU_SH7750) || \
27 defined(CONFIG_CPU_SH7751)
28# include <asm/cpu_sh7750.h>
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090029#elif defined (CONFIG_CPU_SH7722)
Nobuhiro Iwamatsu53b31432008-03-12 12:10:28 +090030# include <asm/cpu_sh7722.h>
Nobuhiro Iwamatsufcabccc2008-08-22 17:48:51 +090031#elif defined (CONFIG_CPU_SH7723)
32# include <asm/cpu_sh7723.h>
Nobuhiro Iwamatsu73bbe6d2012-01-11 10:45:01 +090033#elif defined (CONFIG_CPU_SH7734)
34# include <asm/cpu_sh7734.h>
Yoshihiro Shimoda07fecef2012-11-04 15:53:22 +000035#elif defined (CONFIG_CPU_SH7752)
36# include <asm/cpu_sh7752.h>
Yoshihiro Shimoda95abe5f2013-12-18 16:03:44 +090037#elif defined (CONFIG_CPU_SH7753)
38# include <asm/cpu_sh7753.h>
Yoshihiro Shimodaa7d382c2011-02-02 10:05:36 +090039#elif defined (CONFIG_CPU_SH7757)
40# include <asm/cpu_sh7757.h>
Nobuhiro Iwamatsu6b165de2008-06-06 16:24:13 +090041#elif defined (CONFIG_CPU_SH7763)
42# include <asm/cpu_sh7763.h>
Yusuke Goda54cda8b2008-03-05 14:23:26 +090043#elif defined (CONFIG_CPU_SH7780)
Nobuhiro Iwamatsu53b31432008-03-12 12:10:28 +090044# include <asm/cpu_sh7780.h>
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090045#else
Nobuhiro Iwamatsu53b31432008-03-12 12:10:28 +090046# error "Unknown SH4 variant"
Nobuhiro Iwamatsu970dc332007-05-13 20:58:00 +090047#endif
Nobuhiro Iwamatsu547b67f2007-09-23 02:12:30 +090048
49#endif /* _ASM_CPU_SH4_H_ */