diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 11 | ||||
-rw-r--r-- | common/bloblist.c | 3 | ||||
-rw-r--r-- | common/exports.c | 11 | ||||
-rw-r--r-- | common/memsize.c | 5 | ||||
-rw-r--r-- | common/spl/spl_fit.c | 2 | ||||
-rw-r--r-- | common/usb_onboard_hub.c | 7 |
6 files changed, 22 insertions, 17 deletions
diff --git a/common/Kconfig b/common/Kconfig index a2f653f7e72..66dcc8cde15 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -833,6 +833,13 @@ config PCI_INIT_R case of DM PCI-based Ethernet devices, which will not be detected without having the enumeration performed earlier. +config SYS_EARLY_PCI_INIT + bool "Enumerate PCI buses early during init" + depends on PCI + help + Do early PCI configuration before the eMMC gets initialised, + because PCI resources are crucial for eMMC access on some boards. + config RESET_PHY_R bool "Reset ethernet PHY during init" help @@ -1121,8 +1128,8 @@ config BLOBLIST_SIZE config BLOBLIST_SIZE_RELOC hex "Size of bloblist after relocation" - default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC - default 0x20000 if (ARM && EFI_LOADER && GENERATE_ACPI_TABLE) + default BLOBLIST_SIZE if BLOBLIST_FIXED + default 0x20000 help Sets the size of the bloblist in bytes after relocation. Since U-Boot has a lot more memory available then, it is possible to use a larger diff --git a/common/bloblist.c b/common/bloblist.c index 6e4f020d7c4..d5fa62249a9 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -149,7 +149,8 @@ static int bloblist_addrec(uint tag, int size, int align_log2, { struct bloblist_hdr *hdr = gd->bloblist; struct bloblist_rec *rec; - int data_start, aligned_start, new_alloced; + phys_addr_t data_start, aligned_start; + phys_size_t new_alloced; if (!align_log2) align_log2 = BLOBLIST_BLOB_ALIGN_LOG2; diff --git a/common/exports.c b/common/exports.c index 48b084c3861..1b7fec685b1 100644 --- a/common/exports.c +++ b/common/exports.c @@ -7,10 +7,6 @@ DECLARE_GLOBAL_DATA_PTR; -__attribute__((unused)) static void dummy(void) -{ -} - unsigned long get_version(void) { return XF_VERSION; @@ -18,13 +14,6 @@ unsigned long get_version(void) #define EXPORT_FUNC(f, a, x, ...) gd->jt->x = f; -#ifndef CONFIG_PHY_AQUANTIA -# define mdio_get_current_dev dummy -# define phy_find_by_mask dummy -# define mdio_phydev_for_ethname dummy -# define miiphy_set_current_dev dummy -#endif - int jumptable_init(void) { gd->jt = malloc(sizeof(struct jt_funcs)); diff --git a/common/memsize.c b/common/memsize.c index 86109579c95..3c3ae6f1eba 100644 --- a/common/memsize.c +++ b/common/memsize.c @@ -52,7 +52,10 @@ long get_ram_size(long *base, long maxsize) long val; long size; int i = 0; - int dcache_en = dcache_status(); + int dcache_en = 0; + + if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) + dcache_en = dcache_status(); for (cnt = (maxsize / sizeof(long)) >> 1; cnt > 0; cnt >>= 1) { addr = base + cnt; /* pointer arith! */ diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 25f3c822a49..746c3d2fa28 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -353,7 +353,7 @@ static int load_simple_fit(struct spl_load_info *info, ulong fit_offset, } length = loadEnd - CONFIG_SYS_LOAD_ADDR; } else { - memcpy(load_ptr, src, length); + memmove(load_ptr, src, length); } if (image_info) { diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 805b2ccbc00..6fc34489a98 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -61,8 +61,13 @@ static int usb5744_i2c_init(struct udevice *dev) int ret, slave_addr; ret = dev_read_phandle_with_args(dev, "i2c-bus", NULL, 0, 0, &phandle); + if (ret == -ENOENT) { + dev_dbg(dev, "i2c-bus not specified\n"); + return 0; + } + if (ret) { - dev_err(dev, "i2c-bus not specified\n"); + dev_err(dev, "i2c-bus read failed\n"); return ret; } |