xref: /linux/arch/sh/include/mach-dreamcast/mach/maple.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2f15cbe6fSPaul Mundt #ifndef __ASM_MAPLE_H
3f15cbe6fSPaul Mundt #define __ASM_MAPLE_H
4f15cbe6fSPaul Mundt 
5f15cbe6fSPaul Mundt #define MAPLE_PORTS 4
6f15cbe6fSPaul Mundt #define MAPLE_PNP_INTERVAL HZ
7f15cbe6fSPaul Mundt #define MAPLE_MAXPACKETS 8
8f15cbe6fSPaul Mundt #define MAPLE_DMA_ORDER 14
9f15cbe6fSPaul Mundt #define MAPLE_DMA_SIZE (1 << MAPLE_DMA_ORDER)
10f15cbe6fSPaul Mundt #define MAPLE_DMA_PAGES ((MAPLE_DMA_ORDER > PAGE_SHIFT) ? \
11f15cbe6fSPaul Mundt 			  MAPLE_DMA_ORDER - PAGE_SHIFT : 0)
12f15cbe6fSPaul Mundt 
13f15cbe6fSPaul Mundt /* Maple Bus registers */
14f15cbe6fSPaul Mundt #define MAPLE_BASE     0xa05f6c00
15f15cbe6fSPaul Mundt #define MAPLE_DMAADDR  (MAPLE_BASE+0x04)
16f15cbe6fSPaul Mundt #define MAPLE_TRIGTYPE (MAPLE_BASE+0x10)
17f15cbe6fSPaul Mundt #define MAPLE_ENABLE   (MAPLE_BASE+0x14)
18f15cbe6fSPaul Mundt #define MAPLE_STATE    (MAPLE_BASE+0x18)
19f15cbe6fSPaul Mundt #define MAPLE_SPEED    (MAPLE_BASE+0x80)
20f15cbe6fSPaul Mundt #define MAPLE_RESET    (MAPLE_BASE+0x8c)
21f15cbe6fSPaul Mundt 
22f15cbe6fSPaul Mundt #define MAPLE_MAGIC    0x6155404f
23f15cbe6fSPaul Mundt #define MAPLE_2MBPS    0
24f15cbe6fSPaul Mundt #define MAPLE_TIMEOUT(n) ((n)<<15)
25f15cbe6fSPaul Mundt 
26f15cbe6fSPaul Mundt /* Function codes */
27f15cbe6fSPaul Mundt #define MAPLE_FUNC_CONTROLLER 0x001
28f15cbe6fSPaul Mundt #define MAPLE_FUNC_MEMCARD    0x002
29f15cbe6fSPaul Mundt #define MAPLE_FUNC_LCD        0x004
30f15cbe6fSPaul Mundt #define MAPLE_FUNC_CLOCK      0x008
31f15cbe6fSPaul Mundt #define MAPLE_FUNC_MICROPHONE 0x010
32f15cbe6fSPaul Mundt #define MAPLE_FUNC_ARGUN      0x020
33f15cbe6fSPaul Mundt #define MAPLE_FUNC_KEYBOARD   0x040
34f15cbe6fSPaul Mundt #define MAPLE_FUNC_LIGHTGUN   0x080
35f15cbe6fSPaul Mundt #define MAPLE_FUNC_PURUPURU   0x100
36f15cbe6fSPaul Mundt #define MAPLE_FUNC_MOUSE      0x200
37f15cbe6fSPaul Mundt 
38f15cbe6fSPaul Mundt #endif /* __ASM_MAPLE_H */
39