Hans de Goede | 316e29b | 2014-10-27 23:59:27 +0100 | [diff] [blame] | 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 | |
Chen-Yu Tsai | fcd4c4e | 2016-06-07 10:54:31 +0800 | [diff] [blame] | 12 | #include <linux/compiler.h> |
Chen-Yu Tsai | d14dcb0 | 2016-06-07 10:54:30 +0800 | [diff] [blame] | 13 | #include <linux/types.h> |
| 14 | |
Hans de Goede | 316e29b | 2014-10-27 23:59:27 +0100 | [diff] [blame] | 15 | #ifndef __ASSEMBLY__ |
| 16 | |
Chen-Yu Tsai | fcd4c4e | 2016-06-07 10:54:31 +0800 | [diff] [blame] | 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 { |
Hans de Goede | 316e29b | 2014-10-27 23:59:27 +0100 | [diff] [blame] | 25 | u8 res0[0x40]; /* 0x000 */ |
Chen-Yu Tsai | fcd4c4e | 2016-06-07 10:54:31 +0800 | [diff] [blame] | 26 | struct sunxi_cpucfg_cpu cpu[4]; /* 0x040 */ |
| 27 | u8 res1[0x44]; /* 0x140 */ |
Hans de Goede | 316e29b | 2014-10-27 23:59:27 +0100 | [diff] [blame] | 28 | u32 gen_ctrl; /* 0x184 */ |
| 29 | u32 l2_status; /* 0x188 */ |
Chen-Yu Tsai | fcd4c4e | 2016-06-07 10:54:31 +0800 | [diff] [blame] | 30 | u8 res2[0x4]; /* 0x18c */ |
Hans de Goede | 316e29b | 2014-10-27 23:59:27 +0100 | [diff] [blame] | 31 | u32 event_in; /* 0x190 */ |
Chen-Yu Tsai | fcd4c4e | 2016-06-07 10:54:31 +0800 | [diff] [blame] | 32 | u8 res3[0xc]; /* 0x194 */ |
Hans de Goede | 316e29b | 2014-10-27 23:59:27 +0100 | [diff] [blame] | 33 | u32 super_standy_flag; /* 0x1a0 */ |
| 34 | u32 priv0; /* 0x1a4 */ |
| 35 | u32 priv1; /* 0x1a8 */ |
Chen-Yu Tsai | f3a80e2 | 2016-06-07 10:54:32 +0800 | [diff] [blame^] | 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 */ |
Hans de Goede | 316e29b | 2014-10-27 23:59:27 +0100 | [diff] [blame] | 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 */ |