Statistics
| Branch: | Revision:

root / include / hw / unicore32 / puv3.h @ 0d09e41a

History | View | Annotate | Download (1.6 kB)

1
/*
2
 * Misc PKUnity SoC declarations
3
 *
4
 * Copyright (C) 2010-2012 Guan Xuetao
5
 *
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License version 2 as
8
 * published by the Free Software Foundation, or any later version.
9
 * See the COPYING file in the top-level directory.
10
 */
11
#ifndef QEMU_HW_PUV3_H
12
#define QEMU_HW_PUV3_H
13

    
14
#define PUV3_REGS_OFFSET        (0x1000) /* 4K is reasonable */
15

    
16
/* PKUnity System bus (AHB): 0xc0000000 - 0xedffffff (640MB) */
17
#define PUV3_DMA_BASE           (0xc0200000) /* AHB-4 */
18

    
19
/* PKUnity Peripheral bus (APB): 0xee000000 - 0xefffffff (128MB) */
20
#define PUV3_GPIO_BASE          (0xee500000) /* APB-5 */
21
#define PUV3_INTC_BASE          (0xee600000) /* APB-6 */
22
#define PUV3_OST_BASE           (0xee800000) /* APB-8 */
23
#define PUV3_PM_BASE            (0xeea00000) /* APB-10 */
24
#define PUV3_PS2_BASE           (0xeeb00000) /* APB-11 */
25

    
26
/* Hardware interrupts */
27
#define PUV3_IRQS_NR            (32)
28

    
29
#define PUV3_IRQS_GPIOLOW0      (0)
30
#define PUV3_IRQS_GPIOLOW1      (1)
31
#define PUV3_IRQS_GPIOLOW2      (2)
32
#define PUV3_IRQS_GPIOLOW3      (3)
33
#define PUV3_IRQS_GPIOLOW4      (4)
34
#define PUV3_IRQS_GPIOLOW5      (5)
35
#define PUV3_IRQS_GPIOLOW6      (6)
36
#define PUV3_IRQS_GPIOLOW7      (7)
37
#define PUV3_IRQS_GPIOHIGH      (8)
38
#define PUV3_IRQS_PS2_KBD       (22)
39
#define PUV3_IRQS_PS2_AUX       (23)
40
#define PUV3_IRQS_OST0          (26)
41

    
42
/* All puv3_*.c use DPRINTF for debug. */
43
#ifdef DEBUG_PUV3
44
#define DPRINTF(fmt, ...) printf("%s: " fmt , __func__, ## __VA_ARGS__)
45
#else
46
#define DPRINTF(fmt, ...) do {} while (0)
47
#endif
48

    
49
#endif /* !QEMU_HW_PUV3_H */