Merge branch 'master' of git://git.denx.de/u-boot-mmc
[oweals/u-boot.git] / arch / arm / include / asm / arch-sunxi / cpucfg.h
1 /*
2  * Sunxi A31 CPUCFG register definition.
3  *
4  * (C) Copyright 2014 Hans de Goede <hdegoede@redhat.com
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8
9 #ifndef _SUNXI_CPUCFG_H
10 #define _SUNXI_CPUCFG_H
11
12 #include <linux/compiler.h>
13 #include <linux/types.h>
14
15 #ifndef __ASSEMBLY__
16
17 struct __packed sunxi_cpucfg_cpu {
18         u32 rst;                /* base + 0x0 */
19         u32 ctrl;               /* base + 0x4 */
20         u32 status;             /* base + 0x8 */
21         u8 res[0x34];           /* base + 0xc */
22 };
23
24 struct __packed sunxi_cpucfg_reg {
25         u8 res0[0x40];          /* 0x000 */
26         struct sunxi_cpucfg_cpu cpu[4];         /* 0x040 */
27         u8 res1[0x44];          /* 0x140 */
28         u32 gen_ctrl;           /* 0x184 */
29         u32 l2_status;          /* 0x188 */
30         u8 res2[0x4];           /* 0x18c */
31         u32 event_in;           /* 0x190 */
32         u8 res3[0xc];           /* 0x194 */
33         u32 super_standy_flag;  /* 0x1a0 */
34         u32 priv0;              /* 0x1a4 */
35         u32 priv1;              /* 0x1a8 */
36         u8 res4[0x4];           /* 0x1ac */
37         u32 cpu1_pwr_clamp;     /* 0x1b0 sun7i only */
38         u32 cpu1_pwroff;        /* 0x1b4 sun7i only */
39         u8 res5[0x2c];          /* 0x1b8 */
40         u32 dbg_ctrl1;          /* 0x1e4 */
41         u8 res6[0x18];          /* 0x1e8 */
42         u32 idle_cnt0_low;      /* 0x200 */
43         u32 idle_cnt0_high;     /* 0x204 */
44         u32 idle_cnt0_ctrl;     /* 0x208 */
45         u8 res8[0x4];           /* 0x20c */
46         u32 idle_cnt1_low;      /* 0x210 */
47         u32 idle_cnt1_high;     /* 0x214 */
48         u32 idle_cnt1_ctrl;     /* 0x218 */
49         u8 res9[0x4];           /* 0x21c */
50         u32 idle_cnt2_low;      /* 0x220 */
51         u32 idle_cnt2_high;     /* 0x224 */
52         u32 idle_cnt2_ctrl;     /* 0x228 */
53         u8 res10[0x4];          /* 0x22c */
54         u32 idle_cnt3_low;      /* 0x230 */
55         u32 idle_cnt3_high;     /* 0x234 */
56         u32 idle_cnt3_ctrl;     /* 0x238 */
57         u8 res11[0x4];          /* 0x23c */
58         u32 idle_cnt4_low;      /* 0x240 */
59         u32 idle_cnt4_high;     /* 0x244 */
60         u32 idle_cnt4_ctrl;     /* 0x248 */
61         u8 res12[0x34];         /* 0x24c */
62         u32 cnt64_ctrl;         /* 0x280 */
63         u32 cnt64_low;          /* 0x284 */
64         u32 cnt64_high;         /* 0x288 */
65 };
66
67 #endif /* __ASSEMBLY__ */
68 #endif /* _SUNXI_CPUCFG_H */