diff options
author | Marcin Wojtas <mw@semihalf.com> | 2017-10-04 17:13:28 +0200 |
---|---|---|
committer | Kostya Porotchkin <kostap@marvell.com> | 2017-11-23 11:43:24 +0200 |
commit | 7e6911559d57f832824ce5d80b86ac006c113579 (patch) | |
tree | 9af313f4b1f82bc79f3606bf13c58c88ec1cf9a6 | |
parent | 15015079206a0373ac81d09626d92618d5969724 (diff) |
plat/marvell: a80x0: configure Direct Mode window for SPI flash
In order to be able to support UEFI variables, direct mode access
to the SPI flash is required. The variables will be placed at
4MB - 256KB offset. For this purpose at offset 0xf9000000 configure
new window pointing to the CP1 SPI1 CS0 device. Because the platform
supports maximum amount of 6 IO windows, existing window for CP1 PCIE0
was extended to cover the SPI area as well.
Change-Id: I5ef5eb4ac95f86d78a4af7f474127a04dd083254
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/46712
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
-rw-r--r-- | plat/marvell/a8k/a80x0/board/marvell_plat_config.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plat/marvell/a8k/a80x0/board/marvell_plat_config.c b/plat/marvell/a8k/a80x0/board/marvell_plat_config.c index 9259b18b..00805be8 100644 --- a/plat/marvell/a8k/a80x0/board/marvell_plat_config.c +++ b/plat/marvell/a8k/a80x0/board/marvell_plat_config.c @@ -43,7 +43,10 @@ /******************************************************************************* * AMB Configuration ******************************************************************************/ -struct amb_win *amb_memory_map; +struct amb_win amb_memory_map[] = { + /* CP1 SPI1 CS0 Direct Mode access */ + {0xf900, 0x1000000, AMB_SPI1_CS0_ID}, +}; uintptr_t marvell_get_amb_reg_offs(int cp_index) { @@ -68,8 +71,8 @@ int marvell_get_amb_memory_map(struct amb_win **win, uint32_t *size) struct io_win io_win_memory_map[] = { /* CP1 (MCI0) internal regs */ {0x0, 0xf4000000, 0x0, 0x2000000, MCI_0_TID}, - /* PCIe0 on CP1*/ - {0x0, 0xfa000000, 0x0, 0x1000000, MCI_0_TID}, + /* PCIe0 and SPI1_CS0 (RUNIT) on CP1*/ + {0x0, 0xf9000000, 0x0, 0x2000000, MCI_0_TID}, /* PCIe1 on CP1*/ {0x0, 0xfb000000, 0x0, 0x1000000, MCI_0_TID}, /* PCIe2 on CP1*/ @@ -118,6 +121,8 @@ struct iob_win iob_memory_map_cp0[] = { struct iob_win iob_memory_map_cp1[] = { /* CP1 */ + /* SPI1_CS0 (RUNIT) window */ + {0x0, 0xf9000000, 0x0, 0x1000000, RUNIT_TID}, /* PEX1_X1 window */ {0x0, 0xfb000000, 0x0, 0x1000000, PEX1_TID}, /* PEX2_X1 window */ |