X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Farm%2Finclude%2Fasm%2Farch-sunxi%2Fprcm.h;h=ba4427c925ddc982ff8e7b1db37e1ac668fd5d42;hb=4f84cb980fdc25d7735fe114021b4a84ea601b9f;hp=88de1ff67594ace212b1deb30c246066a741ae82;hpb=62c87ef2e988558edbf983c9344ceb9370dbbf02;p=oweals%2Fu-boot.git diff --git a/arch/arm/include/asm/arch-sunxi/prcm.h b/arch/arm/include/asm/arch-sunxi/prcm.h index 88de1ff675..ba4427c925 100644 --- a/arch/arm/include/asm/arch-sunxi/prcm.h +++ b/arch/arm/include/asm/arch-sunxi/prcm.h @@ -50,7 +50,8 @@ #define PRCM_APB0_GATE_PIO (0x1 << 0) #define PRCM_APB0_GATE_IR (0x1 << 1) #define PRCM_APB0_GATE_TIMER01 (0x1 << 2) -#define PRCM_APB0_GATE_P2WI (0x1 << 3) +#define PRCM_APB0_GATE_P2WI (0x1 << 3) /* sun6i */ +#define PRCM_APB0_GATE_RSB (0x1 << 3) /* sun8i */ #define PRCM_APB0_GATE_UART (0x1 << 4) #define PRCM_APB0_GATE_1WIRE (0x1 << 5) #define PRCM_APB0_GATE_I2C (0x1 << 6) @@ -195,8 +196,14 @@ #define PRCM_CPU3_PWR_CLAMP(n) (((n) & 0xff) << 0) #define PRCM_CPU3_PWR_CLAMP_MASK PRCM_CPU3_PWR_CLAMP(0xff) +#define PRCM_SEC_SWITCH_APB0_CLK_NONSEC (0x1 << 0) +#define PRCM_SEC_SWITCH_PLL_CFG_NONSEC (0x1 << 1) +#define PRCM_SEC_SWITCH_PWR_GATE_NONSEC (0x1 << 2) + #ifndef __ASSEMBLY__ -struct sunxi_prcm_reg { +#include + +struct __packed sunxi_prcm_reg { u32 cpus_cfg; /* 0x000 */ u8 res0[0x8]; /* 0x004 */ u32 apb0_ratio; /* 0x00c */ @@ -224,16 +231,18 @@ struct sunxi_prcm_reg { u32 gpu_pwroff; /* 0x118 */ u8 res9[0x4]; /* 0x11c */ u32 vdd_pwr_reset; /* 0x120 */ - u8 res10[0x20]; /* 0x124 */ - u32 cpu1_pwr_clamp; /* 0x144 */ - u32 cpu2_pwr_clamp; /* 0x148 */ - u32 cpu3_pwr_clamp; /* 0x14c */ + u8 res10[0x1c]; /* 0x124 */ + u32 cpu_pwr_clamp[4]; /* 0x140 but first one is actually unused */ u8 res11[0x30]; /* 0x150 */ u32 dram_pwr; /* 0x180 */ u8 res12[0xc]; /* 0x184 */ u32 dram_tst; /* 0x190 */ + u8 res13[0x3c]; /* 0x194 */ + u32 prcm_sec_switch; /* 0x1d0 */ }; void prcm_apb0_enable(u32 flags); +void prcm_apb0_disable(u32 flags); + #endif /* __ASSEMBLY__ */ #endif /* _PRCM_H */