Skip to content

Commit

Permalink
plat-sam: set QSPI memories as non secure
Browse files Browse the repository at this point in the history
When left unconfigured, the QSPI memories are assigned to the secure
world. However, the controller is assigned to normal world and Linux
expects to use QPSI memories with it which will fail because they are
not accessible. Configure them to be accessible by the normal world in
order to let Linux handle the QSPI controller properly.

Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
  • Loading branch information
clementleger authored and jforissier committed Jan 7, 2022
1 parent f8d4043 commit 3b012d5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions core/arch/arm/plat-sam/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,20 @@ static void matrix_configure_slave_h64mx(void)
ssr_setting);

/* 11: Internal SRAM 128K (Cache L2): Default */
/* 12: QSPI0: Default */
/* 13: QSPI1: Default */

/* 12: QSPI0: Normal world */
/* 13: QSPI1: Normal world */
srtop_setting = MATRIX_SRTOP(0, MATRIX_SRTOP_VALUE_128M);
sasplit_setting = MATRIX_SASPLIT(0, MATRIX_SASPLIT_VALUE_128M);
ssr_setting = MATRIX_LANSECH_NS(0) | MATRIX_RDNSECH_NS(0) |
MATRIX_WRNSECH_NS(0);

matrix_configure_slave_security(matrix64_base(), H64MX_SLAVE_QSPI0,
srtop_setting, sasplit_setting,
ssr_setting);
matrix_configure_slave_security(matrix64_base(), H64MX_SLAVE_QSPI1,
srtop_setting, sasplit_setting,
ssr_setting);
/* 14: AESB: Default */
}

Expand Down

0 comments on commit 3b012d5

Please sign in to comment.