summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/m68k/include/asm/immap.h4
-rw-r--r--configs/M53017EVB_defconfig2
-rw-r--r--configs/M5329AFEE_defconfig2
-rw-r--r--configs/M5329BFEE_defconfig2
-rw-r--r--configs/M5373EVB_defconfig2
-rw-r--r--configs/astro_mcf5373l_defconfig2
-rw-r--r--drivers/rtc/Kconfig8
-rw-r--r--drivers/rtc/mcfrtc.c4
-rw-r--r--include/configs/M53017EVB.h2
-rw-r--r--include/configs/M5329EVB.h3
-rw-r--r--include/configs/M5373EVB.h3
-rw-r--r--include/configs/astro_mcf5373l.h3
-rw-r--r--include/configs/stmark2.h1
13 files changed, 18 insertions, 20 deletions
diff --git a/arch/m68k/include/asm/immap.h b/arch/m68k/include/asm/immap.h
index 02aa95aaf2..ead62cd038 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 52daf5dfe2..784796664a 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 4cf68639e2..134ddfb2a1 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 efe320784a..a86c754e22 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 643637399b..ac9680ba2e 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 81f5ccd991..9eb985c92b 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 71777cdd05..7a6c6efb4b 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 e10638ec7d..d2ac889c30 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 6e2bdbe612..7011a4b81f 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 b6b53960c7..cfb2507a7b 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 b45f15be0e..20102a2b9a 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 b84b7db2e6..f81f84550a 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 e1f2ee0a22..994be1c220 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