blob: e8c0f6408cda9a51004f7b6a7f1e01719227c894 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/*
* Copyright 2021 NXP
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#include <cci.h>
#include <common/debug.h>
#include <ls_interconnect.h>
#include <mmio.h>
#include <platform_def.h>
void erratum_a008850_early(void)
{
/* part 1 of 2 */
uintptr_t cci_base = NXP_CCI_ADDR;
uint32_t val = mmio_read_32(cci_base + CTRL_OVERRIDE_REG);
/* enabling forced barrier termination on CCI400 */
mmio_write_32(cci_base + CTRL_OVERRIDE_REG,
(val | CCI_TERMINATE_BARRIER_TX));
}
void erratum_a008850_post(void)
{
/* part 2 of 2 */
uintptr_t cci_base = NXP_CCI_ADDR;
uint32_t val = mmio_read_32(cci_base + CTRL_OVERRIDE_REG);
/* Clear the BARRIER_TX bit */
val = val & ~(CCI_TERMINATE_BARRIER_TX);
/*
* Disable barrier termination on CCI400, allowing
* barriers to propagate across CCI
*/
mmio_write_32(cci_base + CTRL_OVERRIDE_REG, val);
INFO("SoC workaround for Errata A008850 Post-Phase was applied\n");
}
|