| 1 |
|
| 2 |
|
| 3 |
#include <delay.h> |
| 4 |
#include <soc/addressmap.h> |
| 5 |
#include <soc/clk_rst.h> |
| 6 |
#include <soc/clock.h> |
| 7 |
#include <soc/padconfig.h> |
| 8 |
#include <soc/power.h> |
| 9 |
|
| 10 |
static void enable_ape_periph_clocks(void) |
| 11 |
{ |
| 12 |
clock_enable(0, 0, 0, CLK_V_APB2APE, 0, 0, CLK_Y_APE); |
| 13 |
|
| 14 |
|
| 15 |
udelay(IO_STABILIZATION_DELAY); |
| 16 |
} |
| 17 |
|
| 18 |
static void unreset_ape_periphs(void) |
| 19 |
{ |
| 20 |
clock_clr_reset(0, 0, 0, CLK_V_APB2APE, 0, 0, CLK_Y_APE); |
| 21 |
} |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
void soc_configure_ape(void) |
| 32 |
{ |
| 33 |
power_ungate_partition(POWER_PARTID_APE); |
| 34 |
|
| 35 |
enable_ape_periph_clocks(); |
| 36 |
remove_clamps(POWER_PARTID_APE); |
| 37 |
unreset_ape_periphs(); |
| 38 |
} |