| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#include <lib/mmio.h> |
| 9 |
|
| 10 |
#include <armada_common.h> |
| 11 |
#include <dram_win.h> |
| 12 |
#include <io_addr_dec.h> |
| 13 |
#include <marvell_plat_priv.h> |
| 14 |
#include <plat_marvell.h> |
| 15 |
|
| 16 |
|
| 17 |
static void marvell_bl31_mpp_init(void) |
| 18 |
{ |
| 19 |
mmio_clrbits_32(MVEBU_NB_GPIO_SEL_REG, 1 << MVEBU_GPIO_TW1_GPIO_EN_OFF); |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
mmio_setbits_32(MVEBU_NB_GPIO_OUTPUT_EN_HIGH_REG, |
| 33 |
1 << MVEBU_GPIO_NB_SPI_PIN_MODE_OFF); |
| 34 |
} |
| 35 |
|
| 36 |
|
| 37 |
void bl31_plat_arch_setup(void) |
| 38 |
{ |
| 39 |
struct dec_win_config *io_dec_map; |
| 40 |
uint32_t dec_win_num; |
| 41 |
struct dram_win_map dram_wins_map; |
| 42 |
|
| 43 |
marvell_bl31_plat_arch_setup(); |
| 44 |
|
| 45 |
|
| 46 |
marvell_bl31_mpp_init(); |
| 47 |
|
| 48 |
|
| 49 |
plat_delay_timer_init(); |
| 50 |
|
| 51 |
|
| 52 |
cpu_wins_init(); |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
dram_win_map_build(&dram_wins_map); |
| 58 |
|
| 59 |
|
| 60 |
if (marvell_get_io_dec_win_conf(&io_dec_map, &dec_win_num)) { |
| 61 |
printf("No IO address decoder windows configurations found!\n"); |
| 62 |
return; |
| 63 |
} |
| 64 |
|
| 65 |
|
| 66 |
if (init_io_addr_dec(&dram_wins_map, io_dec_map, dec_win_num)) { |
| 67 |
printf("IO address decoder windows initialization failed!\n"); |
| 68 |
return; |
| 69 |
} |
| 70 |
} |