public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 04/22] Convert CONFIG_MCFRTC et al to Kconfig
Date: Wed, 23 Mar 2022 17:19:51 -0400	[thread overview]
Message-ID: <20220323212009.1066483-4-trini@konsulko.com> (raw)
In-Reply-To: <20220323212009.1066483-1-trini@konsulko.com>

This converts the following to Kconfig:
   CONFIG_MCFRTC
   CONFIG_SYS_MCFRTC_BASE

While at it, remove '#undef RTC_DEBUG' from these config files.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/m68k/include/asm/immap.h    | 4 ----
 configs/M53017EVB_defconfig      | 2 ++
 configs/M5329AFEE_defconfig      | 2 ++
 configs/M5329BFEE_defconfig      | 2 ++
 configs/M5373EVB_defconfig       | 2 ++
 configs/astro_mcf5373l_defconfig | 2 ++
 drivers/rtc/Kconfig              | 8 ++++++++
 drivers/rtc/mcfrtc.c             | 4 ----
 include/configs/M53017EVB.h      | 2 --
 include/configs/M5329EVB.h       | 3 ---
 include/configs/M5373EVB.h       | 3 ---
 include/configs/astro_mcf5373l.h | 3 ---
 include/configs/stmark2.h        | 1 -
 13 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/arch/m68k/include/asm/immap.h b/arch/m68k/include/asm/immap.h
index 02aa95aaf262..ead62cd03871 100644
--- a/arch/m68k/include/asm/immap.h
+++ b/arch/m68k/include/asm/immap.h
@@ -225,8 +225,6 @@
 #define CONFIG_SYS_FEC1_IOBASE		(MMAP_FEC1)
 #define CONFIG_SYS_UART_BASE		(MMAP_UART0 + (CONFIG_SYS_UART_PORT * 0x4000))
 
-#define CONFIG_SYS_MCFRTC_BASE		(MMAP_RTC)
-
 /* Timer */
 #ifdef CONFIG_MCFTMR
 #define CONFIG_SYS_UDELAY_BASE		(MMAP_DTMR0)
@@ -249,7 +247,6 @@
 
 #define CONFIG_SYS_FEC0_IOBASE		(MMAP_FEC)
 #define CONFIG_SYS_UART_BASE		(MMAP_UART0 + (CONFIG_SYS_UART_PORT * 0x4000))
-#define CONFIG_SYS_MCFRTC_BASE		(MMAP_RTC)
 
 /* Timer */
 #ifdef CONFIG_MCFTMR
@@ -283,7 +280,6 @@
 #endif
 
 #define MMAP_DSPI			MMAP_DSPI0
-#define CONFIG_SYS_MCFRTC_BASE		(MMAP_RTC)
 
 /* Timer */
 #ifdef CONFIG_MCFTMR
diff --git a/configs/M53017EVB_defconfig b/configs/M53017EVB_defconfig
index 8ddc838a5cce..f132f3018092 100644
--- a/configs/M53017EVB_defconfig
+++ b/configs/M53017EVB_defconfig
@@ -39,4 +39,6 @@ CONFIG_SYS_FLASH_CFI=y
 CONFIG_DM_ETH=y
 CONFIG_MCFFEC=y
 CONFIG_MII=y
+CONFIG_MCFRTC=y
+CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
diff --git a/configs/M5329AFEE_defconfig b/configs/M5329AFEE_defconfig
index 6b41f756fa5a..273f1be8bbe1 100644
--- a/configs/M5329AFEE_defconfig
+++ b/configs/M5329AFEE_defconfig
@@ -41,4 +41,6 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_DM_ETH=y
 CONFIG_MCFFEC=y
 CONFIG_MII=y
+CONFIG_MCFRTC=y
+CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
diff --git a/configs/M5329BFEE_defconfig b/configs/M5329BFEE_defconfig
index e444332237f1..8dbfbfcd803b 100644
--- a/configs/M5329BFEE_defconfig
+++ b/configs/M5329BFEE_defconfig
@@ -41,4 +41,6 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_DM_ETH=y
 CONFIG_MCFFEC=y
 CONFIG_MII=y
+CONFIG_MCFRTC=y
+CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
diff --git a/configs/M5373EVB_defconfig b/configs/M5373EVB_defconfig
index b474adfe04cf..61ec8c488e42 100644
--- a/configs/M5373EVB_defconfig
+++ b/configs/M5373EVB_defconfig
@@ -41,4 +41,6 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_DM_ETH=y
 CONFIG_MCFFEC=y
 CONFIG_MII=y
+CONFIG_MCFRTC=y
+CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
diff --git a/configs/astro_mcf5373l_defconfig b/configs/astro_mcf5373l_defconfig
index 81f5ccd99116..9eb985c92b78 100644
--- a/configs/astro_mcf5373l_defconfig
+++ b/configs/astro_mcf5373l_defconfig
@@ -40,5 +40,7 @@ CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_MCFRTC=y
+CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
 CONFIG_WATCHDOG=y
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 71777cdd05f7..7a6c6efb4b06 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -168,6 +168,14 @@ config RTC_MC146818
 	  clock with a wide array of features and 50 bytes of general-purpose,
 	  battery-backed RAM. The driver supports access to the clock and RAM.
 
+config MCFRTC
+	bool "Use common CF RTC driver"
+	depends on M68K
+
+config SYS_MCFRTC_BASE
+	hex "Base address for RTC in immap.h"
+	depends on MCFRTC
+
 config RTC_M41T62
 	bool "Enable M41T62 driver"
 	help
diff --git a/drivers/rtc/mcfrtc.c b/drivers/rtc/mcfrtc.c
index e10638ec7dd3..d2ac889c3095 100644
--- a/drivers/rtc/mcfrtc.c
+++ b/drivers/rtc/mcfrtc.c
@@ -13,10 +13,6 @@
 
 #undef RTC_DEBUG
 
-#ifndef CONFIG_SYS_MCFRTC_BASE
-#error RTC_BASE is not defined!
-#endif
-
 #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
 #define	STARTOFTIME		1970
 
diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h
index 6e2bdbe61225..7011a4b81f77 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -36,8 +36,6 @@
 #	endif			/* CONFIG_SYS_DISCOVER_PHY */
 #endif
 
-#define CONFIG_MCFRTC
-#undef RTC_DEBUG
 #define CONFIG_SYS_RTC_CNT		(0x8000)
 #define CONFIG_SYS_RTC_SETUP		(RTC_OCEN_OSCBYP | RTC_OCEN_CLKEN)
 
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index b6b53960c761..cfb2507a7b46 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -33,9 +33,6 @@
 #	endif			/* CONFIG_SYS_DISCOVER_PHY */
 #endif
 
-#define CONFIG_MCFRTC
-#undef RTC_DEBUG
-
 /* I2C */
 
 #ifdef CONFIG_MCFFEC
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index b45f15be0e98..20102a2b9a2a 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -35,9 +35,6 @@
 #	endif			/* CONFIG_SYS_DISCOVER_PHY */
 #endif
 
-#define CONFIG_MCFRTC
-#undef RTC_DEBUG
-
 /* I2C */
 
 #ifdef CONFIG_MCFFEC
diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h
index b84b7db2e64c..f81f84550aa8 100644
--- a/include/configs/astro_mcf5373l.h
+++ b/include/configs/astro_mcf5373l.h
@@ -51,9 +51,6 @@
 #define ENABLE_JFFS	1
 #endif
 
-#define CONFIG_MCFRTC
-#undef RTC_DEBUG
-
 /* I2C */
 
 /*
diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h
index e1f2ee0a22b2..994be1c22022 100644
--- a/include/configs/stmark2.h
+++ b/include/configs/stmark2.h
@@ -35,7 +35,6 @@
 	""
 
 /* Realtime clock */
-#undef CONFIG_MCFRTC
 #define CONFIG_RTC_MCFRRTC
 #define CONFIG_SYS_MCFRRTC_BASE		0xFC0A8000
 
-- 
2.25.1


  parent reply	other threads:[~2022-03-23 21:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 21:19 [PATCH 01/22] Convert CONFIG_CF_DSPI to Kconfig Tom Rini
2022-03-23 21:19 ` [PATCH 02/22] Convert CONFIG_MCFTMR " Tom Rini
2022-03-23 21:19 ` [PATCH 03/22] stmark2: Remove CONFIG_SERIAL_FLASH Tom Rini
2022-03-23 21:19 ` Tom Rini [this message]
2022-03-23 21:19 ` [PATCH 05/22] stmark2: Migrate CONFIG_SYS_EXTRA_OPTIONS to Kconfig Tom Rini
2022-03-23 21:19 ` [PATCH 06/22] mx28evk_auart_console: Remove CONFIG_SYS_EXTRA_OPTIONS Tom Rini
2022-03-23 21:19 ` [PATCH 07/22] Convert CONFIG_EMMC_BOOT et al to Kconfig Tom Rini
2022-03-23 21:19 ` [PATCH 08/22] keymile: Move sourcing of common Kconfig Tom Rini
2022-03-24  7:45   ` Holger Brunck
2022-03-23 21:19 ` [PATCH 09/22] kmtegr1: Drop CONFIG_KMTEGR1 Tom Rini
2022-03-24  4:59   ` Heiko Schocher
2022-03-24  7:46   ` Holger Brunck
2022-03-23 21:19 ` [PATCH 10/22] Convert CONFIG_KM_COGE5UN et al to Kconfig Tom Rini
2022-03-24  7:46   ` Holger Brunck
2022-03-23 21:19 ` [PATCH 11/22] mpc8548cds: Rework CONFIG_LEGACY usage Tom Rini
2022-03-23 21:19 ` [PATCH 12/22] Convert CONFIG_LSCHLV2 to Kconfig et al Tom Rini
2022-03-24 17:48   ` Michael Walle
2022-03-23 21:20 ` [PATCH 13/22] Convert CONFIG_LPUART et al to Kconfig Tom Rini
2022-03-23 21:20 ` [PATCH 14/22] MPC837XERDB: Move CONFIG_PCIE " Tom Rini
2022-03-23 21:20 ` [PATCH 15/22] am43xx_evm_qspiboot: Remove CONFIG_SYS_EXTRA_OPTIONS Tom Rini
2022-03-23 21:20 ` [PATCH 16/22] Convert CONFIG_SDCARD et al to Kconfig Tom Rini
2022-03-23 21:20 ` [PATCH 17/22] global: Remove CONFIG_SYS_USE_DATAFLASH* Tom Rini
2022-03-23 21:20 ` [PATCH 18/22] Convert CONFIG_SYS_USE_NORFLASH et al to Kconfig Tom Rini
2022-03-23 21:20 ` [PATCH 19/22] exynos: Drop CONFIG_CLK_* Tom Rini
2022-03-25  4:41   ` Minkyu Kang
2022-03-28 23:14   ` Jaehoon Chung
2022-03-23 21:20 ` [PATCH 20/22] Convert CONFIG_CLOCK_SYNTHESIZER to Kconfig Tom Rini
2022-03-23 21:20 ` [PATCH 21/22] Convert CONFIG_CLOCKS " Tom Rini
2022-03-23 21:20 ` [PATCH 22/22] p1_p2_rdb: Remove CONFIG_CPLD_[BO]R_PRELIM Tom Rini
2022-04-01 18:45 ` [PATCH 01/22] Convert CONFIG_CF_DSPI to Kconfig Tom Rini

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=20220323212009.1066483-4-trini@konsulko.com \
    --to=trini@konsulko.com \
    --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