aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-02-04 08:19:23 -0500
committerTom Rini <trini@konsulko.com>2021-02-04 08:19:23 -0500
commit21cb717e79e3f6588abae52fe55e2c415850c913 (patch)
treea471725c36bdb2d8578b2343ff0b8a5488db744b /arch
parent67472aa0594186a203e4384ef82b313b0b5922e9 (diff)
parent6f5edbaf938952e4a9860727c633dcaa36caf699 (diff)
downloadu-boot-21cb717e79e3f6588abae52fe55e2c415850c913.zip
u-boot-21cb717e79e3f6588abae52fe55e2c415850c913.tar.gz
u-boot-21cb717e79e3f6588abae52fe55e2c415850c913.tar.bz2
Merge tag 'dm-pull-3feb21' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
Support late device removal Allow booting a 32-bit system with a top memory address beyond 4 GiB
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/bdinfo.c16
-rw-r--r--arch/arm/lib/bootm.c3
-rw-r--r--arch/arm/mach-rockchip/sdram.c2
-rw-r--r--arch/m68k/lib/bdinfo.c2
-rw-r--r--arch/powerpc/lib/bdinfo.c4
-rw-r--r--arch/riscv/cpu/fu540/dram.c7
-rw-r--r--arch/riscv/cpu/generic/dram.c7
-rw-r--r--arch/riscv/include/asm/types.h4
8 files changed, 23 insertions, 22 deletions
diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c
index 25bc6e8..c905783 100644
--- a/arch/arm/lib/bdinfo.c
+++ b/arch/arm/lib/bdinfo.c
@@ -15,23 +15,23 @@ void arch_print_bdinfo(void)
{
struct bd_info *bd = gd->bd;
- bdinfo_print_num("arch_number", bd->bi_arch_number);
+ bdinfo_print_num_l("arch_number", bd->bi_arch_number);
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) {
- bdinfo_print_num("Secure ram",
- gd->arch.secure_ram &
- MEM_RESERVE_SECURE_ADDR_MASK);
+ bdinfo_print_num_ll("Secure ram",
+ gd->arch.secure_ram &
+ MEM_RESERVE_SECURE_ADDR_MASK);
}
#endif
#ifdef CONFIG_RESV_RAM
if (gd->arch.resv_ram)
- bdinfo_print_num("Reserved ram", gd->arch.resv_ram);
+ bdinfo_print_num_ll("Reserved ram", gd->arch.resv_ram);
#endif
#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
- bdinfo_print_num("TLB addr", gd->arch.tlb_addr);
+ bdinfo_print_num_l("TLB addr", gd->arch.tlb_addr);
#endif
- bdinfo_print_num("irq_sp", gd->irq_sp); /* irq stack pointer */
- bdinfo_print_num("sp start ", gd->start_addr_sp);
+ bdinfo_print_num_l("irq_sp", gd->irq_sp); /* irq stack pointer */
+ bdinfo_print_num_l("sp start ", gd->start_addr_sp);
/*
* TODO: Currently only support for davinci SOC's is added.
* Remove this check once all the board implement this.
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 1206e30..f46d51d 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -119,6 +119,9 @@ static void announce_and_cleanup(int fake)
* This may be useful for last-stage operations, like cancelling
* of DMA operation or releasing device internal buffers.
*/
+ dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL);
+
+ /* Remove all active vital devices next */
dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL);
cleanup_before_linux();
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index 4c637b7..c3d5fed 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -37,7 +37,7 @@ struct tos_parameter_t {
int dram_init_banksize(void)
{
size_t top = min((unsigned long)(gd->ram_size + CONFIG_SYS_SDRAM_BASE),
- gd->ram_top);
+ (unsigned long)(gd->ram_top));
#ifdef CONFIG_ARM64
/* Reserve 0x200000 for ATF bl31 */
diff --git a/arch/m68k/lib/bdinfo.c b/arch/m68k/lib/bdinfo.c
index 404e5f1..92ea175 100644
--- a/arch/m68k/lib/bdinfo.c
+++ b/arch/m68k/lib/bdinfo.c
@@ -38,7 +38,7 @@ void arch_print_bdinfo(void)
bdinfo_print_mhz("busfreq", bd->bi_busfreq);
#if defined(CONFIG_SYS_MBAR)
- bdinfo_print_num("mbar", bd->bi_mbar_base);
+ bdinfo_print_num_l("mbar", bd->bi_mbar_base);
#endif
bdinfo_print_mhz("cpufreq", bd->bi_intfreq);
if (IS_ENABLED(CONFIG_PCI))
diff --git a/arch/powerpc/lib/bdinfo.c b/arch/powerpc/lib/bdinfo.c
index 36c9c99..b14e75b 100644
--- a/arch/powerpc/lib/bdinfo.c
+++ b/arch/powerpc/lib/bdinfo.c
@@ -47,9 +47,9 @@ void arch_print_bdinfo(void)
bdinfo_print_mhz("busfreq", bd->bi_busfreq);
#if defined(CONFIG_MPC8xx) || defined(CONFIG_E500)
- bdinfo_print_num("immr_base", bd->bi_immr_base);
+ bdinfo_print_num_l("immr_base", bd->bi_immr_base);
#endif
- bdinfo_print_num("bootflags", bd->bi_bootflags);
+ bdinfo_print_num_l("bootflags", bd->bi_bootflags);
bdinfo_print_mhz("intfreq", bd->bi_intfreq);
#ifdef CONFIG_ENABLE_36BIT_PHYS
if (IS_ENABLED(CONFIG_PHYS_64BIT))
diff --git a/arch/riscv/cpu/fu540/dram.c b/arch/riscv/cpu/fu540/dram.c
index 1dc77ef..259da65 100644
--- a/arch/riscv/cpu/fu540/dram.c
+++ b/arch/riscv/cpu/fu540/dram.c
@@ -22,7 +22,6 @@ int dram_init_banksize(void)
ulong board_get_usable_ram_top(ulong total_size)
{
-#ifdef CONFIG_64BIT
/*
* Ensure that we run from first 4GB so that all
* addresses used by U-Boot are 32bit addresses.
@@ -31,8 +30,8 @@ ulong board_get_usable_ram_top(ulong total_size)
* devices work fine because DMA mapping APIs will
* provide 32bit DMA addresses only.
*/
- if (gd->ram_top > SZ_4G)
- return SZ_4G;
-#endif
+ if (gd->ram_top >= SZ_4G)
+ return SZ_4G - 1;
+
return gd->ram_top;
}
diff --git a/arch/riscv/cpu/generic/dram.c b/arch/riscv/cpu/generic/dram.c
index 1dc77ef..259da65 100644
--- a/arch/riscv/cpu/generic/dram.c
+++ b/arch/riscv/cpu/generic/dram.c
@@ -22,7 +22,6 @@ int dram_init_banksize(void)
ulong board_get_usable_ram_top(ulong total_size)
{
-#ifdef CONFIG_64BIT
/*
* Ensure that we run from first 4GB so that all
* addresses used by U-Boot are 32bit addresses.
@@ -31,8 +30,8 @@ ulong board_get_usable_ram_top(ulong total_size)
* devices work fine because DMA mapping APIs will
* provide 32bit DMA addresses only.
*/
- if (gd->ram_top > SZ_4G)
- return SZ_4G;
-#endif
+ if (gd->ram_top >= SZ_4G)
+ return SZ_4G - 1;
+
return gd->ram_top;
}
diff --git a/arch/riscv/include/asm/types.h b/arch/riscv/include/asm/types.h
index b800b2d..49f7a5d 100644
--- a/arch/riscv/include/asm/types.h
+++ b/arch/riscv/include/asm/types.h
@@ -35,8 +35,8 @@ typedef u64 dma_addr_t;
typedef u32 dma_addr_t;
#endif
-typedef unsigned long phys_addr_t;
-typedef unsigned long phys_size_t;
+typedef unsigned long long phys_addr_t;
+typedef unsigned long long phys_size_t;
#endif /* __KERNEL__ */