aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-arm/platforms/vexpress.h
blob: 982a293d7949cd512cffca722d69fc8e4bf36f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __ASM_ARM_PLATFORMS_VEXPRESS_H
#define __ASM_ARM_PLATFORMS_VEXPRESS_H

/* V2M */
#define V2M_SYS_MMIO_BASE     (0x1c010000)
#define V2M_SYS_FLAGSSET      (0x30)
#define V2M_SYS_FLAGSCLR      (0x34)

#define V2M_SYS_CFGDATA       (0x00A0)
#define V2M_SYS_CFGCTRL       (0x00A4)
#define V2M_SYS_CFGSTAT       (0x00A8)

#define V2M_SYS_CFG_START     (1<<31)
#define V2M_SYS_CFG_WRITE     (1<<30)
#define V2M_SYS_CFG_ERROR     (1<<1)
#define V2M_SYS_CFG_COMPLETE  (1<<0)

#define V2M_SYS_CFG_OSC_FUNC  1
#define V2M_SYS_CFG_OSC0      0
#define V2M_SYS_CFG_OSC1      1
#define V2M_SYS_CFG_OSC2      2
#define V2M_SYS_CFG_OSC3      3
#define V2M_SYS_CFG_OSC4      4
#define V2M_SYS_CFG_OSC5      5

/* Board-specific: base address of system controller */
#define SP810_ADDRESS 0x1C020000

#ifndef __ASSEMBLY__
#include <xen/inttypes.h>

int vexpress_syscfg(int write, int function, int device, uint32_t *data);
#endif

/* Constants below is only used in assembly because the DTS is not yet parsed */
#ifdef __ASSEMBLY__

/* GIC base address */
#define V2M_GIC_BASE_ADDRESS        0x2c000000

/* Timer's frequency */
#define V2M_TIMER_FREQUENCY         0x5f5e100 /* 100 Mhz */

#endif /* __ASSEMBLY__ */

#endif /* __ASM_ARM_PLATFORMS_VEXPRESS_H */
/*
 * Local variables:
 * mode: C
 * c-file-style: "BSD"
 * c-basic-offset: 4
 * indent-tabs-mode: nil
 * End:
 */