| 1 |
|
| 2 |
|
| 3 |
#include <console/console.h> |
| 4 |
#include <device/mmio.h> |
| 5 |
#include <soc/pwrsel.h> |
| 6 |
|
| 7 |
static void cpu_pwrsel_init(void) |
| 8 |
{ |
| 9 |
write32p(MCUSYS_BASE + OFFSET_PWRSEL, VAL_PWRSEL); |
| 10 |
write32p(MCUSYS_BASE + OFFSET_PWRSEL_AUTO_MODE_CFG, VAL_PWRSEL_AUTO_MODE); |
| 11 |
} |
| 12 |
|
| 13 |
static void gpu_pwrsel_init(void) |
| 14 |
{ |
| 15 |
write32p(MFG_VCORE_AO_RPC_PWRSEL_CONFIG, GENMASK(14, 0)); |
| 16 |
} |
| 17 |
|
| 18 |
void pwrsel_init(void) |
| 19 |
{ |
| 20 |
cpu_pwrsel_init(); |
| 21 |
gpu_pwrsel_init(); |
| 22 |
|
| 23 |
|
| 24 |
printk(BIOS_DEBUG, "PWR_SEL = %#x\n", read32p(MCUSYS_BASE + OFFSET_PWRSEL)); |
| 25 |
|
| 26 |
printk(BIOS_DEBUG, "PWRSEL_CONFIG = %#x\n", read32p(MFG_VCORE_AO_RPC_PWRSEL_CONFIG)); |
| 27 |
} |