Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.
This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.
Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
index 6b1de82..60519c3 100644
--- a/drivers/timer/Kconfig
+++ b/drivers/timer/Kconfig
@@ -50,14 +50,6 @@
use an early timer. These functions must be supported by your timer
driver: timer_early_get_count() and timer_early_get_rate().
-config ADI_SC5XX_TIMER
- bool "ADI ADSP-SC5xx Timer Support"
- depends on TIMER && (SC57X || SC58X || SC59X || SC59X_64)
- help
- gptimer based timer support on ADI's ADSP-SC5xx platforms. Available
- but not required on sc59x-64-based platforms (598 and similar).
- Required on 32-bit platforms (sc57x, sc58x, sc594 and earlier).
-
config ALTERA_TIMER
bool "Altera timer support"
depends on TIMER
diff --git a/drivers/timer/Makefile b/drivers/timer/Makefile
index fb95c88..b93145e 100644
--- a/drivers/timer/Makefile
+++ b/drivers/timer/Makefile
@@ -3,7 +3,6 @@
# Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
obj-y += timer-uclass.o
-obj-$(CONFIG_ADI_SC5XX_TIMER) += adi_sc5xx_timer.o
obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
obj-$(CONFIG_$(SPL_)ANDES_PLMT_TIMER) += andes_plmt_timer.o
obj-$(CONFIG_ARC_TIMER) += arc_timer.o
diff --git a/drivers/timer/adi_sc5xx_timer.c b/drivers/timer/adi_sc5xx_timer.c
deleted file mode 100644
index 11c0984..0000000
--- a/drivers/timer/adi_sc5xx_timer.c
+++ /dev/null
@@ -1,145 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * (C) Copyright 2022 - Analog Devices, Inc.
- *
- * Written and/or maintained by Timesys Corporation
- *
- * Converted to driver model by Nathan Barrett-Morrison
- *
- * Author: Greg Malysa <greg.malysa@timesys.com>
- * Additional Contact: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
- *
- * dm timer implementation for ADI ADSP-SC5xx SoCs
- *
- */
-
-#include <clk.h>
-#include <dm.h>
-#include <timer.h>
-#include <asm/io.h>
-#include <dm/device_compat.h>
-#include <linux/compiler_types.h>
-
-/*
- * Timer Configuration Register Bits
- */
-#define TIMER_OUT_DIS 0x0800
-#define TIMER_PULSE_HI 0x0080
-#define TIMER_MODE_PWM_CONT 0x000c
-
-#define __BFP(m) u16 m; u16 __pad_##m
-
-struct gptimer3 {
- __BFP(config);
- u32 counter;
- u32 period;
- u32 width;
- u32 delay;
-};
-
-struct gptimer3_group_regs {
- __BFP(run);
- __BFP(enable);
- __BFP(disable);
- __BFP(stop_cfg);
- __BFP(stop_cfg_set);
- __BFP(stop_cfg_clr);
- __BFP(data_imsk);
- __BFP(stat_imsk);
- __BFP(tr_msk);
- __BFP(tr_ie);
- __BFP(data_ilat);
- __BFP(stat_ilat);
- __BFP(err_status);
- __BFP(bcast_per);
- __BFP(bcast_wid);
- __BFP(bcast_dly);
-};
-
-#define MAX_TIM_LOAD 0xFFFFFFFF
-
-struct adi_gptimer_priv {
- struct gptimer3_group_regs __iomem *timer_group;
- struct gptimer3 __iomem *timer_base;
- u32 prev;
- u64 upper;
-};
-
-static u64 adi_gptimer_get_count(struct udevice *udev)
-{
- struct adi_gptimer_priv *priv = dev_get_priv(udev);
-
- u32 now = readl(&priv->timer_base->counter);
-
- if (now < priv->prev)
- priv->upper += (1ull << 32);
-
- priv->prev = now;
-
- return (priv->upper + (u64)now);
-}
-
-static const struct timer_ops adi_gptimer_ops = {
- .get_count = adi_gptimer_get_count,
-};
-
-static int adi_gptimer_probe(struct udevice *udev)
-{
- struct timer_dev_priv *uc_priv = dev_get_uclass_priv(udev);
- struct adi_gptimer_priv *priv = dev_get_priv(udev);
- struct clk clk;
- u16 imask;
- int ret;
-
- priv->timer_group = dev_remap_addr_index(udev, 0);
- priv->timer_base = dev_remap_addr_index(udev, 1);
- priv->upper = 0;
- priv->prev = 0;
-
- if (!priv->timer_group || !priv->timer_base) {
- dev_err(udev, "Missing timer_group or timer_base reg entries\n");
- return -ENODEV;
- }
-
- ret = clk_get_by_index(udev, 0, &clk);
- if (ret < 0) {
- dev_err(udev, "Missing clock reference for timer\n");
- return ret;
- }
-
- ret = clk_enable(&clk);
- if (ret) {
- dev_err(udev, "Failed to enable clock\n");
- return ret;
- }
-
- uc_priv->clock_rate = clk_get_rate(&clk);
-
- /* Enable timer */
- writew(TIMER_OUT_DIS | TIMER_MODE_PWM_CONT | TIMER_PULSE_HI,
- &priv->timer_base->config);
- writel(MAX_TIM_LOAD, &priv->timer_base->period);
- writel(MAX_TIM_LOAD - 1, &priv->timer_base->width);
-
- /* We only use timer 0 in uboot */
- imask = readw(&priv->timer_group->data_imsk);
- imask &= ~(1 << 0);
- writew(imask, &priv->timer_group->data_imsk);
- writew((1 << 0), &priv->timer_group->enable);
-
- return 0;
-}
-
-static const struct udevice_id adi_gptimer_ids[] = {
- { .compatible = "adi,sc5xx-gptimer" },
- { },
-};
-
-U_BOOT_DRIVER(adi_gptimer) = {
- .name = "adi_gptimer",
- .id = UCLASS_TIMER,
- .of_match = adi_gptimer_ids,
- .priv_auto = sizeof(struct adi_gptimer_priv),
- .probe = adi_gptimer_probe,
- .ops = &adi_gptimer_ops,
-};
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index ece246c..040dc65 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -7,6 +7,7 @@
* Scott McNutt <smcnutt@psyent.com>
*/
+#include <common.h>
#include <dm.h>
#include <errno.h>
#include <timer.h>
diff --git a/drivers/timer/andes_plmt_timer.c b/drivers/timer/andes_plmt_timer.c
index 20baaf6..42dd4b6 100644
--- a/drivers/timer/andes_plmt_timer.c
+++ b/drivers/timer/andes_plmt_timer.c
@@ -8,6 +8,7 @@
* associated with timer tick.
*/
+#include <common.h>
#include <dm.h>
#include <timer.h>
#include <asm/io.h>
diff --git a/drivers/timer/arc_timer.c b/drivers/timer/arc_timer.c
index 413bcc3..497f8a0 100644
--- a/drivers/timer/arc_timer.c
+++ b/drivers/timer/arc_timer.c
@@ -3,6 +3,7 @@
* Copyright (C) 2016 Synopsys, Inc. All rights reserved.
*/
+#include <common.h>
#include <dm.h>
#include <errno.h>
#include <timer.h>
diff --git a/drivers/timer/arm_global_timer.c b/drivers/timer/arm_global_timer.c
index b805792..2e50d9f 100644
--- a/drivers/timer/arm_global_timer.c
+++ b/drivers/timer/arm_global_timer.c
@@ -6,7 +6,7 @@
* ARM Cortext A9 global timer driver
*/
-#include <config.h>
+#include <common.h>
#include <dm.h>
#include <clk.h>
#include <timer.h>
diff --git a/drivers/timer/arm_twd_timer.c b/drivers/timer/arm_twd_timer.c
index 2b2f359..40ccd16 100644
--- a/drivers/timer/arm_twd_timer.c
+++ b/drivers/timer/arm_twd_timer.c
@@ -27,6 +27,7 @@
* Alex Zuepke <azu@sysgo.de>
*/
+#include <common.h>
#include <dm.h>
#include <fdtdec.h>
#include <timer.h>
diff --git a/drivers/timer/ast_timer.c b/drivers/timer/ast_timer.c
index 6601cab..78adc96 100644
--- a/drivers/timer/ast_timer.c
+++ b/drivers/timer/ast_timer.c
@@ -3,6 +3,7 @@
* Copyright 2016 Google Inc.
*/
+#include <common.h>
#include <dm.h>
#include <errno.h>
#include <timer.h>
diff --git a/drivers/timer/atmel_pit_timer.c b/drivers/timer/atmel_pit_timer.c
index 0a367a5..5cf46f2 100644
--- a/drivers/timer/atmel_pit_timer.c
+++ b/drivers/timer/atmel_pit_timer.c
@@ -4,6 +4,7 @@
* Wenyou.Yang <wenyou.yang@microchip.com>
*/
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <timer.h>
diff --git a/drivers/timer/atmel_tcb_timer.c b/drivers/timer/atmel_tcb_timer.c
index 3a328b2..8c17987 100644
--- a/drivers/timer/atmel_tcb_timer.c
+++ b/drivers/timer/atmel_tcb_timer.c
@@ -5,6 +5,7 @@
* Author: Clément Léger <clement.leger@bootlin.com>
*/
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <timer.h>
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index 3cffb1b..2eff450 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -3,6 +3,7 @@
* Copyright (C) 2018 Xilinx, Inc. (Michal Simek)
*/
+#include <common.h>
#include <bootstage.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c
index 77ccb98..0607f75 100644
--- a/drivers/timer/dw-apb-timer.c
+++ b/drivers/timer/dw-apb-timer.c
@@ -5,6 +5,7 @@
* Copyright (C) 2018 Marek Vasut <marex@denx.de>
*/
+#include <common.h>
#include <dm.h>
#include <clk.h>
#include <dt-structs.h>
diff --git a/drivers/timer/fttmr010_timer.c b/drivers/timer/fttmr010_timer.c
index c41bbfc..b6289e6 100644
--- a/drivers/timer/fttmr010_timer.c
+++ b/drivers/timer/fttmr010_timer.c
@@ -5,6 +5,7 @@
*
* 23/08/2022 Port to DM
*/
+#include <common.h>
#include <dm.h>
#include <log.h>
#include <timer.h>
diff --git a/drivers/timer/imx-gpt-timer.c b/drivers/timer/imx-gpt-timer.c
index 07b9fdb..9c3b64a 100644
--- a/drivers/timer/imx-gpt-timer.c
+++ b/drivers/timer/imx-gpt-timer.c
@@ -4,7 +4,7 @@
* Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com>
*/
-#include <config.h>
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <fdtdec.h>
diff --git a/drivers/timer/mchp-pit64b-timer.c b/drivers/timer/mchp-pit64b-timer.c
index 1a5b2e6..c9806d7 100644
--- a/drivers/timer/mchp-pit64b-timer.c
+++ b/drivers/timer/mchp-pit64b-timer.c
@@ -7,6 +7,7 @@
* Author: Claudiu Beznea <claudiu.beznea@microchip.com>
*/
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <timer.h>
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index 9da7447..7814cb6 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -4,7 +4,7 @@
* Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
*/
-#include <config.h>
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <irq_func.h>
diff --git a/drivers/timer/mtk_timer.c b/drivers/timer/mtk_timer.c
index 8216c28..223e63f 100644
--- a/drivers/timer/mtk_timer.c
+++ b/drivers/timer/mtk_timer.c
@@ -7,6 +7,7 @@
*/
#include <clk.h>
+#include <common.h>
#include <dm.h>
#include <timer.h>
#include <asm/io.h>
diff --git a/drivers/timer/nomadik-mtu-timer.c b/drivers/timer/nomadik-mtu-timer.c
index 9a05582..4d24de1 100644
--- a/drivers/timer/nomadik-mtu-timer.c
+++ b/drivers/timer/nomadik-mtu-timer.c
@@ -12,6 +12,7 @@
* Copyright (C) 2010 Linus Walleij for ST-Ericsson
*/
+#include <common.h>
#include <dm.h>
#include <timer.h>
#include <asm/io.h>
diff --git a/drivers/timer/npcm-timer.c b/drivers/timer/npcm-timer.c
index 9463fd2..4562a6f 100644
--- a/drivers/timer/npcm-timer.c
+++ b/drivers/timer/npcm-timer.c
@@ -3,6 +3,7 @@
* Copyright (c) 2022 Nuvoton Technology Corp.
*/
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <timer.h>
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
index fda6356..9b6d97d 100644
--- a/drivers/timer/omap-timer.c
+++ b/drivers/timer/omap-timer.c
@@ -5,6 +5,7 @@
* Copyright (C) 2015, Texas Instruments, Incorporated
*/
+#include <common.h>
#include <dm.h>
#include <errno.h>
#include <timer.h>
diff --git a/drivers/timer/orion-timer.c b/drivers/timer/orion-timer.c
index 821b681..9cab27f 100644
--- a/drivers/timer/orion-timer.c
+++ b/drivers/timer/orion-timer.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
#include <asm/io.h>
-#include <config.h>
+#include <common.h>
#include <div64.h>
#include <dm/device.h>
#include <dm/fdtaddr.h>
diff --git a/drivers/timer/ostm_timer.c b/drivers/timer/ostm_timer.c
index 314f956..3bf0d46 100644
--- a/drivers/timer/ostm_timer.c
+++ b/drivers/timer/ostm_timer.c
@@ -5,6 +5,7 @@
* Copyright (C) 2019 Marek Vasut <marek.vasut@gmail.com>
*/
+#include <common.h>
#include <clock_legacy.h>
#include <malloc.h>
#include <asm/global_data.h>
diff --git a/drivers/timer/riscv_aclint_timer.c b/drivers/timer/riscv_aclint_timer.c
index 35da1ea..73fb879 100644
--- a/drivers/timer/riscv_aclint_timer.c
+++ b/drivers/timer/riscv_aclint_timer.c
@@ -4,7 +4,7 @@
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
*/
-#include <config.h>
+#include <common.h>
#include <clk.h>
#include <div64.h>
#include <dm.h>
diff --git a/drivers/timer/riscv_timer.c b/drivers/timer/riscv_timer.c
index 1f4980c..169c03d 100644
--- a/drivers/timer/riscv_timer.c
+++ b/drivers/timer/riscv_timer.c
@@ -10,7 +10,7 @@
* This driver provides generic timer support for S-mode U-Boot.
*/
-#include <config.h>
+#include <common.h>
#include <div64.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 96c010f..e66c49a 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -3,6 +3,7 @@
* Copyright (C) 2017 Theobroma Systems Design und Consulting GmbH
*/
+#include <common.h>
#include <bootstage.h>
#include <dm.h>
#include <init.h>
diff --git a/drivers/timer/sandbox_timer.c b/drivers/timer/sandbox_timer.c
index e8b54a0..1da7e0c 100644
--- a/drivers/timer/sandbox_timer.c
+++ b/drivers/timer/sandbox_timer.c
@@ -3,6 +3,7 @@
* Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
*/
+#include <common.h>
#include <dm.h>
#include <errno.h>
#include <timer.h>
diff --git a/drivers/timer/sp804_timer.c b/drivers/timer/sp804_timer.c
index a254e29..8fd4afb 100644
--- a/drivers/timer/sp804_timer.c
+++ b/drivers/timer/sp804_timer.c
@@ -4,6 +4,7 @@
* Copyright (C) 2022 Arm Ltd.
*/
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <init.h>
diff --git a/drivers/timer/starfive-timer.c b/drivers/timer/starfive-timer.c
index 6b79c88..6ac7d7f 100644
--- a/drivers/timer/starfive-timer.c
+++ b/drivers/timer/starfive-timer.c
@@ -4,6 +4,7 @@
* Author: Kuan Lim Lee <kuanlim.lee@starfivetech.com>
*/
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <time.h>
diff --git a/drivers/timer/stm32_timer.c b/drivers/timer/stm32_timer.c
index 1dc21c5..1213a14 100644
--- a/drivers/timer/stm32_timer.c
+++ b/drivers/timer/stm32_timer.c
@@ -6,7 +6,7 @@
#define LOG_CATEGORY UCLASS_TIMER
-#include <config.h>
+#include <common.h>
#include <clk.h>
#include <dm.h>
#include <fdtdec.h>
diff --git a/drivers/timer/tegra-timer.c b/drivers/timer/tegra-timer.c
index 3545424..a867c64 100644
--- a/drivers/timer/tegra-timer.c
+++ b/drivers/timer/tegra-timer.c
@@ -3,6 +3,7 @@
* Copyright (C) 2022 Svyatoslav Ryhel <clamor95@gmail.com>
*/
+#include <common.h>
#include <dm.h>
#include <errno.h>
#include <timer.h>
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index 8305f06..60ff655 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -5,6 +5,7 @@
#define LOG_CATEGORY UCLASS_TIMER
+#include <common.h>
#include <clk.h>
#include <cpu.h>
#include <dm.h>
diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c
index 80c084f..f86a0b8 100644
--- a/drivers/timer/tsc_timer.c
+++ b/drivers/timer/tsc_timer.c
@@ -6,6 +6,7 @@
* arch/x86/kernel/tsc_msr.c and arch/x86/kernel/tsc.c
*/
+#include <common.h>
#include <bootstage.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/timer/xilinx-timer.c b/drivers/timer/xilinx-timer.c
index 54148aa..172fd9f 100644
--- a/drivers/timer/xilinx-timer.c
+++ b/drivers/timer/xilinx-timer.c
@@ -7,6 +7,7 @@
* Michal SIMEK <monstr@monstr.eu>
*/
+#include <common.h>
#include <dm.h>
#include <timer.h>
#include <regmap.h>