From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Cc: "Michael Walle" <michael@walle.cc>, "Pali Rohár" <pali@kernel.org>
Subject: [PATCH 1/2] arm: mvebu: Remove timer.c
Date: Wed, 21 Sep 2022 08:26:41 +0200 [thread overview]
Message-ID: <20220921062642.910994-1-sr@denx.de> (raw)
Since the move to CONFIG_TIMER with support for CONFIG_TIMER_EARLY, this
platform specific init_timer() function is not needed any more. Let's
remove it completely.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Michael Walle <michael@walle.cc>
Cc: Pali Rohár <pali@kernel.org>
---
arch/arm/mach-mvebu/Makefile | 5 -----
arch/arm/mach-mvebu/spl.c | 2 --
arch/arm/mach-mvebu/timer.c | 41 ------------------------------------
3 files changed, 48 deletions(-)
delete mode 100644 arch/arm/mach-mvebu/timer.c
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 103e64cf2047..406a9ee8f686 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -16,10 +16,6 @@ obj-y = dram.o
obj-y += gpio.o
obj-y += mbus.o
-ifndef CONFIG_TIMER
-obj-y += timer.o
-endif
-
else # CONFIG_ARCH_KIRKWOOD
obj-y = cpu.o
@@ -97,7 +93,6 @@ $(obj)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
endif # CONFIG_SPL_BUILD
obj-y += gpio.o
obj-y += mbus.o
-obj-y += timer.o
obj-$(CONFIG_SPL_BUILD) += spl.o
obj-$(CONFIG_SPL_BUILD) += lowlevel_spl.o
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index ca2d5a59d773..424599286e5e 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -340,8 +340,6 @@ void board_init_f(ulong dummy)
preloader_console_init();
- timer_init();
-
/* Armada 375 does not support SerDes and DDR3 init yet */
#if !defined(CONFIG_ARMADA_375)
/* First init the serdes PHY's */
diff --git a/arch/arm/mach-mvebu/timer.c b/arch/arm/mach-mvebu/timer.c
deleted file mode 100644
index 557a378776d7..000000000000
--- a/arch/arm/mach-mvebu/timer.c
+++ /dev/null
@@ -1,41 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) Marvell International Ltd. and its affiliates
- * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
- *
- * Copyright (C) 2015 Stefan Roese <sr@denx.de>
- */
-
-#include <common.h>
-#include <init.h>
-#include <asm/io.h>
-#include <asm/arch/soc.h>
-#include <linux/bitops.h>
-
-#define TIMER_LOAD_VAL 0xffffffff
-
-static int init_done __section(".data") = 0;
-
-/*
- * Timer initialization
- */
-int timer_init(void)
-{
- /* Only init the timer once */
- if (init_done)
- return 0;
- init_done = 1;
-
- /* load value into timer */
- writel(TIMER_LOAD_VAL, MVEBU_TIMER_BASE + 0x10);
- writel(TIMER_LOAD_VAL, MVEBU_TIMER_BASE + 0x14);
-
-#if defined(CONFIG_ARCH_MVEBU)
- /* On Armada XP / 38x ..., the 25MHz clock source needs to be enabled */
- setbits_le32(MVEBU_TIMER_BASE + 0x00, BIT(11));
-#endif
- /* enable timer in auto reload mode */
- setbits_le32(MVEBU_TIMER_BASE + 0x00, 0x3);
-
- return 0;
-}
--
2.37.3
next reply other threads:[~2022-09-21 6:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 6:26 Stefan Roese [this message]
2022-09-21 6:26 ` [PATCH 2/2] timer: orion-timer: Only init timer once Stefan Roese
2022-10-06 10:46 ` Stefan Roese
2022-10-06 10:46 ` [PATCH 1/2] arm: mvebu: Remove timer.c Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220921062642.910994-1-sr@denx.de \
--to=sr@denx.de \
--cc=michael@walle.cc \
--cc=pali@kernel.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox