summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2013-11-08 11:18:55 +0000
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-11-09 17:21:02 +0100
commit3ced12a06baaf90039fa171688d33358b15613d1 (patch)
tree314b2b31fd85d854c1426992172471244a5d2626
parente174bd74c93637e78eb81048891acd4ea61520a9 (diff)
malta: enable RTC support
This is actually required in order for a Linux kernel to boot successfully on a physical Malta board. Without enabling the RTC, a Malta Linux kernel will get stuck in its estimate_frequencies function on boot. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
-rw-r--r--board/imgtec/malta/malta.c8
-rw-r--r--drivers/rtc/mc146818.c2
-rw-r--r--include/configs/malta.h5
3 files changed, 14 insertions, 1 deletions
diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
index 119546ae16..2f92259756 100644
--- a/board/imgtec/malta/malta.c
+++ b/board/imgtec/malta/malta.c
@@ -9,6 +9,7 @@
#include <netdev.h>
#include <pci_gt64120.h>
#include <pci_msc01.h>
+#include <rtc.h>
#include <serial.h>
#include <asm/addrspace.h>
@@ -147,6 +148,13 @@ int board_early_init_f(void)
return 0;
}
+int misc_init_r(void)
+{
+ rtc_reset();
+
+ return 0;
+}
+
struct serial_device *default_serial_console(void)
{
switch (malta_sys_con()) {
diff --git a/drivers/rtc/mc146818.c b/drivers/rtc/mc146818.c
index 5f9d359590..f7cf1064f9 100644
--- a/drivers/rtc/mc146818.c
+++ b/drivers/rtc/mc146818.c
@@ -15,7 +15,7 @@
#include <command.h>
#include <rtc.h>
-#ifdef __I386__
+#if defined(__I386__) || defined(CONFIG_MALTA)
#include <asm/io.h>
#define in8(p) inb(p)
#define out8(p, v) outb(v, p)
diff --git a/include/configs/malta.h b/include/configs/malta.h
index ab5ba95e47..a0f6a4a7e9 100644
--- a/include/configs/malta.h
+++ b/include/configs/malta.h
@@ -23,6 +23,10 @@
#define CONFIG_PCNET_79C973
#define PCNET_HAS_PROM
+#define CONFIG_MISC_INIT_R
+#define CONFIG_RTC_MC146818
+#define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0
+
/*
* CPU Configuration
*/
@@ -105,6 +109,7 @@
#undef CONFIG_CMD_LOADS
#undef CONFIG_CMD_NFS
+#define CONFIG_CMD_DATE
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_PCI
#define CONFIG_CMD_PING