blob: b548a35f4c62356781c714236642fc9caa829728 [file] [log] [blame]
Nobuhiro Iwamatsue92c95182008-03-12 12:15:29 +09001#ifndef __ASM_SH_CACHE_H
2#define __ASM_SH_CACHE_H
3
Masahiro Yamada7d236662014-11-06 15:55:21 +09004#if defined(CONFIG_CPU_SH4)
Nobuhiro Iwamatsue92c95182008-03-12 12:15:29 +09005
6#define L1_CACHE_BYTES 32
Anton Staaf2482e3c2011-10-17 16:46:07 -07007
Nobuhiro Iwamatsue92c95182008-03-12 12:15:29 +09008struct __large_struct { unsigned long buf[100]; };
9#define __m(x) (*(struct __large_struct *)(x))
10
Anton Staaf2482e3c2011-10-17 16:46:07 -070011#else
12
13/*
14 * 32-bytes is the largest L1 data cache line size for SH the architecture. So
15 * it is a safe default for DMA alignment.
16 */
17#define ARCH_DMA_MINALIGN 32
18
Masahiro Yamada7d236662014-11-06 15:55:21 +090019#endif /* CONFIG_CPU_SH4 */
Nobuhiro Iwamatsue92c95182008-03-12 12:15:29 +090020
Anton Staaf2482e3c2011-10-17 16:46:07 -070021/*
22 * Use the L1 data cache line size value for the minimum DMA buffer alignment
23 * on SH.
24 */
25#ifndef ARCH_DMA_MINALIGN
26#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
27#endif
28
Nobuhiro Iwamatsue92c95182008-03-12 12:15:29 +090029#endif /* __ASM_SH_CACHE_H */