From a99d652ff1e8fa98228ebec9009cd06ba17139bd Mon Sep 17 00:00:00 2001 From: Manorit Chawdhry Date: Mon, 8 Jan 2024 13:48:48 +0530 Subject: include: env: ti: ti_common: Fix a missing semicolon Fix a missing semicolon that leads to syntax error while booting j721s2. Importing environment from mmc1 ... syntax error at 'run'HUSH died! Fixes: 0d72b0f2f83b ("include: env: ti: ti_common: Run main_cpsw0_qsgmii_phyinit conditionally") Signed-off-by: Manorit Chawdhry Reviewed-by: Mattijs Korpershoek --- include/env/ti/ti_common.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env index f0f89a22876..5473f633aa7 100644 --- a/include/env/ti/ti_common.env +++ b/include/env/ti/ti_common.env @@ -27,7 +27,7 @@ bootcmd_ti_mmc= #if CONFIG_CMD_REMOTEPROC if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1; then run main_cpsw0_qsgmii_phyinit; - fi + fi; run boot_rprocs; #endif if test ${boot_fit} -eq 1; -- cgit v1.3.1 From 27cc5951c862355da310e0bd2c42487979b9fa00 Mon Sep 17 00:00:00 2001 From: Manorit Chawdhry Date: Mon, 8 Jan 2024 13:48:49 +0530 Subject: include: env: ti: add default for do_main_cpsw0_qsgmii_phyinit By default this variable is unset and this causes the test condition to fail on devices that don't have this defined. Set a default value for this. => boot ## Error: "main_cpsw0_qsgmii_phyinit" not defined [...] Fixes: 0d72b0f2f83b ("include: env: ti: ti_common: Run main_cpsw0_qsgmii_phyinit conditionally") Signed-off-by: Manorit Chawdhry Reviewed-by: Mattijs Korpershoek --- include/env/ti/ti_common.env | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env index 5473f633aa7..02b410c3adc 100644 --- a/include/env/ti/ti_common.env +++ b/include/env/ti/ti_common.env @@ -22,6 +22,7 @@ get_fit_overlaystring= done; get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} +do_main_cpsw0_qsgmii_phyinit=0 bootcmd_ti_mmc= run findfdt; run init_${boot}; #if CONFIG_CMD_REMOTEPROC -- cgit v1.3.1 From 040834703497bafb81fce88a92d8e54c8837fcaa Mon Sep 17 00:00:00 2001 From: Moritz Fischer Date: Wed, 10 Jan 2024 04:59:02 +0000 Subject: drivers: pci: Fix dm_pci_map_bar() to support 64b BARs This enables 64b BARs if CONFIG_SYS_PCI_64BIT is enabled. Reviewed-by: Philip Oberfichtner Reviewed-by: Simon Glass Signed-off-by: Moritz Fischer --- drivers/pci/pci-uclass.c | 11 +++++++++++ include/pci.h | 1 + 2 files changed, 12 insertions(+) (limited to 'include') diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index e0d01f6a85d..1a48256de03 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -1611,6 +1611,17 @@ void *dm_pci_map_bar(struct udevice *dev, int bar, size_t offset, size_t len, dm_pci_read_config32(udev, bar, &bar_response); pci_bus_addr = (pci_addr_t)(bar_response & ~0xf); + /* This has a lot of baked in assumptions, but essentially tries + * to mirror the behavior of BAR assignment for 64 Bit enabled + * hosts and 64 bit placeable BARs in the auto assign code. + */ +#if defined(CONFIG_SYS_PCI_64BIT) + if (bar_response & PCI_BASE_ADDRESS_MEM_TYPE_64) { + dm_pci_read_config32(udev, bar + 4, &bar_response); + pci_bus_addr |= (pci_addr_t)bar_response << 32; + } +#endif /* CONFIG_SYS_PCI_64BIT */ + if (~((pci_addr_t)0) - pci_bus_addr < offset) return NULL; diff --git a/include/pci.h b/include/pci.h index 2f5eb30b83c..aad233769a3 100644 --- a/include/pci.h +++ b/include/pci.h @@ -1354,6 +1354,7 @@ pci_addr_t dm_pci_phys_to_bus(struct udevice *dev, phys_addr_t addr, size_t len, * type 1 functions. * Can also be used on type 0 functions that support Enhanced Allocation for * 32b/64b BARs. Note that duplicate BEI entries are not supported. + * Can also be used on 64b bars on type 0 functions. * * @dev: Device to check * @bar: Bar register offset (PCI_BASE_ADDRESS_...) -- cgit v1.3.1