drivers/espi: it8xxx2: Fix mask when SRAM size not the power of 2
When using the it8xxx2bx chip, because the SRAM size is 60k and not a power of 2, using (CONFIG_SRAM_SIZE - 1) results in an incorrect value for the h2ram base address mask. Therefore, the mask is declared as GEMASK(19, 0) here. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This commit is contained in:
parent
b9a4900c30
commit
32a19ea28c
1 changed files with 1 additions and 1 deletions
|
|
@ -209,7 +209,7 @@ static const struct ec2i_t pmc2_settings[] = {
|
|||
*/
|
||||
#define IT8XXX2_ESPI_H2RAM_POOL_SIZE_MAX 0x1000
|
||||
#define IT8XXX2_ESPI_H2RAM_OFFSET_MASK GENMASK(5, 0)
|
||||
#define IT8XXX2_ESPI_H2RAM_BASEADDR_MASK (KB(CONFIG_SRAM_SIZE) - 1)
|
||||
#define IT8XXX2_ESPI_H2RAM_BASEADDR_MASK GENMASK(19, 0)
|
||||
|
||||
#if defined(CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION)
|
||||
#define H2RAM_ACPI_SHM_MAX ((CONFIG_ESPI_IT8XXX2_ACPI_SHM_H2RAM_SIZE) + \
|
||||
|
|
|
|||
Loading…
Reference in a new issue