diff options
Diffstat (limited to 'roms/u-boot/arch/arm/cpu/armv7/kona-common')
5 files changed, 86 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/cpu/armv7/kona-common/Makefile b/roms/u-boot/arch/arm/cpu/armv7/kona-common/Makefile new file mode 100644 index 000000000..56de3d18e --- /dev/null +++ b/roms/u-boot/arch/arm/cpu/armv7/kona-common/Makefile @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright 2013 Broadcom Corporation. + +obj-y += s_init.o +obj-y += hwinit-common.o +obj-y += clk-stubs.o +obj-${CONFIG_KONA_RESET_S} += reset.o diff --git a/roms/u-boot/arch/arm/cpu/armv7/kona-common/clk-stubs.c b/roms/u-boot/arch/arm/cpu/armv7/kona-common/clk-stubs.c new file mode 100644 index 000000000..4eddaca88 --- /dev/null +++ b/roms/u-boot/arch/arm/cpu/armv7/kona-common/clk-stubs.c @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2013 Broadcom Corporation. + */ + +#include <common.h> + +/* + * These weak functions are available to kona architectures that don't + * require clock enables from the driver code. + */ +int __weak clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep) +{ + return 0; +} + +int __weak clk_bsc_enable(void *base) +{ + return 0; +} + +int __weak clk_usb_otg_enable(void *base) +{ + return 0; +} diff --git a/roms/u-boot/arch/arm/cpu/armv7/kona-common/hwinit-common.c b/roms/u-boot/arch/arm/cpu/armv7/kona-common/hwinit-common.c new file mode 100644 index 000000000..cfc7c9fbc --- /dev/null +++ b/roms/u-boot/arch/arm/cpu/armv7/kona-common/hwinit-common.c @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2013 Broadcom Corporation. + */ + +#include <common.h> +#include <cpu_func.h> +#include <asm/cache.h> +#include <linux/sizes.h> + +#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) +void enable_caches(void) +{ + /* Enable D-cache. I-cache is already enabled in start.S */ + dcache_enable(); +} +#endif diff --git a/roms/u-boot/arch/arm/cpu/armv7/kona-common/reset.S b/roms/u-boot/arch/arm/cpu/armv7/kona-common/reset.S new file mode 100644 index 000000000..eea835b34 --- /dev/null +++ b/roms/u-boot/arch/arm/cpu/armv7/kona-common/reset.S @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2013 Broadcom Corporation. + */ + +.globl reset_cpu +reset_cpu: + ldr r1, =0x35001f00 + ldr r2, [r1] + ldr r4, =0x80000000 + and r4, r2, r4 + ldr r3, =0xA5A500 + orr r4, r4, r3 + orr r4, r4, #0x1 + + str r4, [r1] + + ldr r1, =0x35001f04 + ldr r2, [r1] + ldr r4, =0x80000000 + and r4, r2, r4 + str r4, [r1] + +_loop_forever: + b _loop_forever diff --git a/roms/u-boot/arch/arm/cpu/armv7/kona-common/s_init.c b/roms/u-boot/arch/arm/cpu/armv7/kona-common/s_init.c new file mode 100644 index 000000000..778b9176f --- /dev/null +++ b/roms/u-boot/arch/arm/cpu/armv7/kona-common/s_init.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2014 Broadcom Corporation. + */ + +/* + * Early system init. Currently empty. + */ +void s_init(void) +{ +} |