Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 2 | /* |
Yusuke Goda | 54cda8b | 2008-03-05 14:23:26 +0900 | [diff] [blame] | 3 | * (C) Copyright 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 4 | */ |
| 5 | |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 6 | #ifndef _ASM_CPU_SH4_H_ |
| 7 | #define _ASM_CPU_SH4_H_ |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 8 | |
| 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 Iwamatsu | 121e2c5 | 2008-11-25 11:05:19 +0900 | [diff] [blame] | 15 | |
| 16 | #if defined (CONFIG_CPU_SH7750) || \ |
| 17 | defined(CONFIG_CPU_SH7751) |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 18 | #define CACHE_OC_WAY_SHIFT 14 |
| 19 | #define CACHE_OC_NUM_ENTRIES 512 |
Nobuhiro Iwamatsu | 121e2c5 | 2008-11-25 11:05:19 +0900 | [diff] [blame] | 20 | #else |
| 21 | #define CACHE_OC_WAY_SHIFT 13 |
| 22 | #define CACHE_OC_NUM_ENTRIES 256 |
| 23 | #endif |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 24 | #define CACHE_OC_ENTRY_SHIFT 5 |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 25 | |
Nobuhiro Iwamatsu | 53b3143 | 2008-03-12 12:10:28 +0900 | [diff] [blame] | 26 | #if defined (CONFIG_CPU_SH7750) || \ |
| 27 | defined(CONFIG_CPU_SH7751) |
| 28 | # include <asm/cpu_sh7750.h> |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 29 | #elif defined (CONFIG_CPU_SH7722) |
Nobuhiro Iwamatsu | 53b3143 | 2008-03-12 12:10:28 +0900 | [diff] [blame] | 30 | # include <asm/cpu_sh7722.h> |
Nobuhiro Iwamatsu | fcabccc | 2008-08-22 17:48:51 +0900 | [diff] [blame] | 31 | #elif defined (CONFIG_CPU_SH7723) |
| 32 | # include <asm/cpu_sh7723.h> |
Nobuhiro Iwamatsu | 73bbe6d | 2012-01-11 10:45:01 +0900 | [diff] [blame] | 33 | #elif defined (CONFIG_CPU_SH7734) |
| 34 | # include <asm/cpu_sh7734.h> |
Yoshihiro Shimoda | 07fecef | 2012-11-04 15:53:22 +0000 | [diff] [blame] | 35 | #elif defined (CONFIG_CPU_SH7752) |
| 36 | # include <asm/cpu_sh7752.h> |
Yoshihiro Shimoda | 95abe5f | 2013-12-18 16:03:44 +0900 | [diff] [blame] | 37 | #elif defined (CONFIG_CPU_SH7753) |
| 38 | # include <asm/cpu_sh7753.h> |
Yoshihiro Shimoda | a7d382c | 2011-02-02 10:05:36 +0900 | [diff] [blame] | 39 | #elif defined (CONFIG_CPU_SH7757) |
| 40 | # include <asm/cpu_sh7757.h> |
Nobuhiro Iwamatsu | 6b165de | 2008-06-06 16:24:13 +0900 | [diff] [blame] | 41 | #elif defined (CONFIG_CPU_SH7763) |
| 42 | # include <asm/cpu_sh7763.h> |
Yusuke Goda | 54cda8b | 2008-03-05 14:23:26 +0900 | [diff] [blame] | 43 | #elif defined (CONFIG_CPU_SH7780) |
Nobuhiro Iwamatsu | 53b3143 | 2008-03-12 12:10:28 +0900 | [diff] [blame] | 44 | # include <asm/cpu_sh7780.h> |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 45 | #else |
Nobuhiro Iwamatsu | 53b3143 | 2008-03-12 12:10:28 +0900 | [diff] [blame] | 46 | # error "Unknown SH4 variant" |
Nobuhiro Iwamatsu | 970dc33 | 2007-05-13 20:58:00 +0900 | [diff] [blame] | 47 | #endif |
Nobuhiro Iwamatsu | 547b67f | 2007-09-23 02:12:30 +0900 | [diff] [blame] | 48 | |
| 49 | #endif /* _ASM_CPU_SH4_H_ */ |