From 5a53441a91e41cdcf720dfacbd2ac4e804cf8341 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 8 Sep 2020 16:57:22 +0300 Subject: x86: edison: Move config SYS_MALLOC_LEN to Kconfig This patch moves the the config SYS_MALLOC_LEN to Kconfig as it is already done for zynq arch in commit 01aa5b8f0503 ("Kconfig: Move config SYS_MALLOC_LEN to Kconfig for zynq"). Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- board/intel/edison/Kconfig | 3 +++ include/configs/edison.h | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/board/intel/edison/Kconfig b/board/intel/edison/Kconfig index ef9b14a..05d6544 100644 --- a/board/intel/edison/Kconfig +++ b/board/intel/edison/Kconfig @@ -12,6 +12,9 @@ config SYS_SOC config SYS_CONFIG_NAME default "edison" +config SYS_MALLOC_LEN + default 0x08000000 + config SYS_TEXT_BASE default 0x01101000 diff --git a/include/configs/edison.h b/include/configs/edison.h index 606c656..0e1205b 100644 --- a/include/configs/edison.h +++ b/include/configs/edison.h @@ -23,10 +23,6 @@ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_MONITOR_LEN (256 * 1024) -#define CONFIG_SYS_MALLOC_LEN (128 * 1024 * 1024) - -/* Environment */ - /* RTC */ #define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0 -- cgit v1.1 From 4364a3f852afe6f45f25a44f089adb9e98c338e1 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 21 Sep 2020 11:34:21 +0300 Subject: cmd: acpi: Print revisions in hex format The revisions are usually dates in hex-decimal format representing YYYYmmdd. Print them in hex to see this clearly. Before: ... FACP 000e5420 0000f4 (v06 U-BOOT U-BOOTBL 538970376 INTL 0) DSDT 000e4780 000ba0 (v02 U-BOOT U-BOOTBL 65536 INTL 538968870) ... After: ... FACP 000e5420 0000f4 (v06 U-BOOT U-BOOTBL 20200908 INTL 0) DSDT 000e4780 000ba0 (v02 U-BOOT U-BOOTBL 10000 INTL 20200326) ... Fixes: 0b885bcfd9b0 ("acpi: Add an acpi command") Cc: Wolfgang Wallner Signed-off-by: Andy Shevchenko Reviewed-by: Bin Meng --- cmd/acpi.c | 2 +- test/dm/acpi.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/acpi.c b/cmd/acpi.c index 085a3a6..a3419b4 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -26,7 +26,7 @@ static void dump_hdr(struct acpi_table_header *hdr) printf("%.*s %08lx %06x", ACPI_NAME_LEN, hdr->signature, (ulong)map_to_sysmem(hdr), hdr->length); if (has_hdr) { - printf(" (v%02d %.6s %.8s %u %.4s %d)\n", hdr->revision, + printf(" (v%02d %.6s %.8s %x %.4s %x)\n", hdr->revision, hdr->oem_id, hdr->oem_table_id, hdr->oem_revision, hdr->aslc_id, hdr->aslc_revision); } else { diff --git a/test/dm/acpi.c b/test/dm/acpi.c index 16aa161..1f252a8 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -366,21 +366,21 @@ static int dm_test_acpi_cmd_list(struct unit_test_state *uts) ut_assert_nextline("RSDP %08lx %06lx (v02 U-BOOT)", addr, sizeof(struct acpi_rsdp)); addr = ALIGN(addr + sizeof(struct acpi_rsdp), 16); - ut_assert_nextline("RSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("RSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_table_header) + 3 * sizeof(u32), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_rsdt), 16); - ut_assert_nextline("XSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("XSDT %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_table_header) + 3 * sizeof(u64), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_xsdt), 64); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_dmar), 16); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); addr = ALIGN(addr + sizeof(struct acpi_dmar), 16); - ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %u INTL 0)", + ut_assert_nextline("DMAR %08lx %06lx (v01 U-BOOT U-BOOTBL %x INTL 0)", addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE); ut_assert_console_end(); -- cgit v1.1 From 674c58c7b73db3a1e1297b87397c61e09915e7d7 Mon Sep 17 00:00:00 2001 From: Wolfgang Wallner Date: Fri, 11 Sep 2020 16:52:28 +0200 Subject: x86: fsp: Replace e-mmc with emmc in devicetree bindings The term eMMC is used inconsistently within the FSP devicetree bindings (e-mmc and emmc), especially for "emmc-host-max-speed" documentation and code disagree. Change all eMMC instances within the FSP bindings to consistently use "emmc". The term "emmc" is already used a lot within U-Boot, while "e-mmc" is only used in the FSP bindings. Signed-off-by: Wolfgang Wallner Reviewed-by: Simon Glass Reviewed-by: Bin Meng [bmeng: correct one typo in the commit message] Signed-off-by: Bin Meng --- arch/x86/cpu/apollolake/fsp_bindings.c | 6 +++--- doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt | 2 +- doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/apollolake/fsp_bindings.c b/arch/x86/cpu/apollolake/fsp_bindings.c index bbf04b5..319c78b 100644 --- a/arch/x86/cpu/apollolake/fsp_bindings.c +++ b/arch/x86/cpu/apollolake/fsp_bindings.c @@ -555,7 +555,7 @@ const struct fsp_binding fsp_m_bindings[] = { }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_m_config, e_mmc_trace_len), - .propname = "fspm,e-mmc-trace-len", + .propname = "fspm,emmc-trace-len", }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_m_config, skip_cse_rbp), @@ -1465,11 +1465,11 @@ const struct fsp_binding fsp_s_bindings[] = { }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_s_config, e_mmc_enabled), - .propname = "fsps,e-mmc-enabled", + .propname = "fsps,emmc-enabled", }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_s_config, e_mmc_host_max_speed), - .propname = "fsps,e-mmc-host-max-speed", + .propname = "fsps,emmc-host-max-speed", }, { .type = FSP_UINT8, .offset = offsetof(struct fsp_s_config, ufs_enabled), diff --git a/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt b/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt index 666400e..36936f2 100644 --- a/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt +++ b/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-m.txt @@ -174,7 +174,7 @@ Optional properties: - fspm,oem-loading-base: OEM File Loading Address - fspm,oem-file-name: OEM File Name to Load - fspm,mrc-boot-data-ptr: -- fspm,e-mmc-trace-len: eMMC Trace Length +- fspm,emmc-trace-len: eMMC Trace Length 0x0: Long 0x1: Short - fspm,skip-cse-rbp: Skip CSE RBP to support zero sized IBB diff --git a/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt b/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt index 731a310..b605ed0 100644 --- a/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt +++ b/doc/device-tree-bindings/fsp/fsp2/apollolake/fsp-s.txt @@ -318,7 +318,7 @@ Optional properties: 0x6: warm reset (default) 0xE: cold reset - fsps,sdcard-enabled: SD Card Support (D27:F0) -- fsps,e-mmc-enabled: SeMMC Support (D28:F0) +- fsps,emmc-enabled: SeMMC Support (D28:F0) - fsps,emmc-host-max-speed: eMMC Max Speed 0: HS400(default) 1: HS200 -- cgit v1.1 From 3f6966ab2b9a2264c05d699353e61b276b1a85bd Mon Sep 17 00:00:00 2001 From: Wolfgang Wallner Date: Wed, 16 Sep 2020 16:57:52 +0200 Subject: x86: acpi: Fix calculation of DSDT length Currently, the calculation for the length of the DSDT table includes any bytes that are added for alignment, but those bytes are not initialized. This is because the DSDT length is calculated after a call to acpi_inc_align(). Split this up into the following sequence: * acpi_inc() * Calculate DSDT length * acpi_align() Signed-off-by: Wolfgang Wallner Reviewed-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- arch/x86/lib/acpi_table.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 3a93fed..6b827bf 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -427,7 +427,7 @@ ulong write_acpi_tables(ulong start_addr) (char *)&AmlCode + sizeof(struct acpi_table_header), dsdt->length - sizeof(struct acpi_table_header)); - acpi_inc_align(ctx, dsdt->length - sizeof(struct acpi_table_header)); + acpi_inc(ctx, dsdt->length - sizeof(struct acpi_table_header)); /* Pack GNVS into the ACPI table area */ for (i = 0; i < dsdt->length; i++) { @@ -450,6 +450,8 @@ ulong write_acpi_tables(ulong start_addr) dsdt->checksum = 0; dsdt->checksum = table_compute_checksum((void *)dsdt, dsdt->length); + acpi_align(ctx); + /* * Fill in platform-specific global NVS variables. If this fails we * cannot return the error but this should only happen while debugging. -- cgit v1.1 From 40edea3a07ebb89e86c9bde8c94000c8f6613be7 Mon Sep 17 00:00:00 2001 From: Wolfgang Wallner Date: Wed, 16 Sep 2020 16:57:53 +0200 Subject: x86: acpi: Add memset to initialize SPCR table Add a missing memset to acpi_create_spcr(). The other acpi_create_xxxx() functions perform a memset on their structures, acpi_create_spcr() does not and as a result the contents of this table are partly uninitialized (and thus random after every reset). Fixes: b288cd960072 ("x86: acpi: Generate SPCR table") Signed-off-by: Wolfgang Wallner Reviewed-by: Andy Shevchenko Reviewed-by: Simon Glass Reviewed-by: Bin Meng [bmeng: fix the tags format in the commit message] Signed-off-by: Bin Meng --- arch/x86/lib/acpi_table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 6b827bf..c445aa6 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -252,6 +252,8 @@ static void acpi_create_spcr(struct acpi_spcr *spcr) int space_id; int ret = -ENODEV; + memset((void *)spcr, 0, sizeof(struct acpi_spcr)); + /* Fill out header fields */ acpi_fill_header(header, "SPCR"); header->length = sizeof(struct acpi_spcr); -- cgit v1.1