diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/arch/arm/mach-highbank | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/arch/arm/mach-highbank')
-rw-r--r-- | roms/u-boot/arch/arm/mach-highbank/Kconfig | 12 | ||||
-rw-r--r-- | roms/u-boot/arch/arm/mach-highbank/Makefile | 6 | ||||
-rw-r--r-- | roms/u-boot/arch/arm/mach-highbank/timer.c | 34 |
3 files changed, 52 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/mach-highbank/Kconfig b/roms/u-boot/arch/arm/mach-highbank/Kconfig new file mode 100644 index 000000000..0e73c0414 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-highbank/Kconfig @@ -0,0 +1,12 @@ +if ARCH_HIGHBANK + +config SYS_BOARD + default "highbank" + +config SYS_SOC + default "highbank" + +config SYS_CONFIG_NAME + default "highbank" + +endif diff --git a/roms/u-boot/arch/arm/mach-highbank/Makefile b/roms/u-boot/arch/arm/mach-highbank/Makefile new file mode 100644 index 000000000..029e266be --- /dev/null +++ b/roms/u-boot/arch/arm/mach-highbank/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. + +obj-y := timer.o diff --git a/roms/u-boot/arch/arm/mach-highbank/timer.c b/roms/u-boot/arch/arm/mach-highbank/timer.c new file mode 100644 index 000000000..2423a0e37 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-highbank/timer.c @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2010-2011 Calxeda, Inc. + * + * Based on arm926ejs/mx27/timer.c + */ + +#include <common.h> +#include <init.h> +#include <asm/io.h> +#include <asm/arch-armv7/systimer.h> + +#undef SYSTIMER_BASE +#define SYSTIMER_BASE 0xFFF34000 /* Timer 0 and 1 base */ + +static struct systimer *systimer_base = (struct systimer *)SYSTIMER_BASE; + +/* + * Start the timer + */ +int timer_init(void) +{ + /* + * Setup timer0 + */ + writel(0, &systimer_base->timer0control); + writel(SYSTIMER_RELOAD, &systimer_base->timer0load); + writel(SYSTIMER_RELOAD, &systimer_base->timer0value); + writel(SYSTIMER_EN | SYSTIMER_32BIT | SYSTIMER_PRESC_256, + &systimer_base->timer0control); + + return 0; + +} |