aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>2007-05-11 08:33:30 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-05-11 09:28:33 -0400
commitb0cc114c04c114b933661eba329d9776c0eab74c (patch)
tree1d797d048c600eeb083b11d5d289d2061b7021d4 /arch
parentfb82a3a7674e754729c2e31183b538e39a900e5b (diff)
[MIPS] Use RTC_CMOS for Cobalt
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/cobalt/Makefile2
-rw-r--r--arch/mips/cobalt/rtc.c63
-rw-r--r--arch/mips/configs/cobalt_defconfig49
3 files changed, 102 insertions, 12 deletions
diff --git a/arch/mips/cobalt/Makefile b/arch/mips/cobalt/Makefile
index 444166651872..c292f80a8c74 100644
--- a/arch/mips/cobalt/Makefile
+++ b/arch/mips/cobalt/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the Cobalt micro systems family specific parts of the kernel 2# Makefile for the Cobalt micro systems family specific parts of the kernel
3# 3#
4 4
5obj-y := buttons.o irq.o reset.o serial.o setup.o 5obj-y := buttons.o irq.o reset.o rtc.o serial.o setup.o
6 6
7obj-$(CONFIG_PCI) += pci.o 7obj-$(CONFIG_PCI) += pci.o
8obj-$(CONFIG_EARLY_PRINTK) += console.o 8obj-$(CONFIG_EARLY_PRINTK) += console.o
diff --git a/arch/mips/cobalt/rtc.c b/arch/mips/cobalt/rtc.c
new file mode 100644
index 000000000000..284daefc5c55
--- /dev/null
+++ b/arch/mips/cobalt/rtc.c
@@ -0,0 +1,63 @@
1/*
2 * Registration of Cobalt RTC platform device.
3 *
4 * Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#include <linux/errno.h>
21#include <linux/init.h>
22#include <linux/ioport.h>
23#include <linux/platform_device.h>
24
25static struct resource cobalt_rtc_resource[] __initdata = {
26 {
27 .start = 0x70,
28 .end = 0x77,
29 .flags = IORESOURCE_IO,
30 },
31 {
32 .start = 8,
33 .end = 8,
34 .flags = IORESOURCE_IRQ,
35 },
36};
37
38static __init int cobalt_rtc_add(void)
39{
40 struct platform_device *pdev;
41 int retval;
42
43 pdev = platform_device_alloc("rtc_cmos", -1);
44 if (!pdev)
45 return -ENOMEM;
46
47 retval = platform_device_add_resources(pdev, cobalt_rtc_resource,
48 ARRAY_SIZE(cobalt_rtc_resource));
49 if (retval)
50 goto err_free_device;
51
52 retval = platform_device_add(pdev);
53 if (retval)
54 goto err_free_device;
55
56 return 0;
57
58err_free_device:
59 platform_device_put(pdev);
60
61 return retval;
62}
63device_initcall(cobalt_rtc_add);
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig
index ba593b510b76..631b2138ad68 100644
--- a/arch/mips/configs/cobalt_defconfig
+++ b/arch/mips/configs/cobalt_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20 3# Linux kernel version: 2.6.21-rc7
4# Tue Feb 20 21:47:24 2007 4# Wed Apr 18 14:25:45 2007
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -62,7 +62,6 @@ CONFIG_MIPS_COBALT=y
62# CONFIG_TOSHIBA_JMR3927 is not set 62# CONFIG_TOSHIBA_JMR3927 is not set
63# CONFIG_TOSHIBA_RBTX4927 is not set 63# CONFIG_TOSHIBA_RBTX4927 is not set
64# CONFIG_TOSHIBA_RBTX4938 is not set 64# CONFIG_TOSHIBA_RBTX4938 is not set
65CONFIG_EARLY_PRINTK=y
66CONFIG_RWSEM_GENERIC_SPINLOCK=y 65CONFIG_RWSEM_GENERIC_SPINLOCK=y
67# CONFIG_ARCH_HAS_ILOG2_U32 is not set 66# CONFIG_ARCH_HAS_ILOG2_U32 is not set
68# CONFIG_ARCH_HAS_ILOG2_U64 is not set 67# CONFIG_ARCH_HAS_ILOG2_U64 is not set
@@ -74,12 +73,14 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
74CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 73CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
75CONFIG_DMA_NONCOHERENT=y 74CONFIG_DMA_NONCOHERENT=y
76CONFIG_DMA_NEED_PCI_MAP_STATE=y 75CONFIG_DMA_NEED_PCI_MAP_STATE=y
76CONFIG_EARLY_PRINTK=y
77CONFIG_SYS_HAS_EARLY_PRINTK=y
77CONFIG_I8259=y 78CONFIG_I8259=y
78# CONFIG_CPU_BIG_ENDIAN is not set 79# CONFIG_CPU_BIG_ENDIAN is not set
79CONFIG_CPU_LITTLE_ENDIAN=y 80CONFIG_CPU_LITTLE_ENDIAN=y
80CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 81CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
81CONFIG_IRQ_CPU=y 82CONFIG_IRQ_CPU=y
82CONFIG_MIPS_GT64111=y 83CONFIG_PCI_GT64XXX_PCI0=y
83CONFIG_MIPS_L1_CACHE_SHIFT=5 84CONFIG_MIPS_L1_CACHE_SHIFT=5
84 85
85# 86#
@@ -179,6 +180,7 @@ CONFIG_SYSVIPC_SYSCTL=y
179# CONFIG_IKCONFIG is not set 180# CONFIG_IKCONFIG is not set
180CONFIG_SYSFS_DEPRECATED=y 181CONFIG_SYSFS_DEPRECATED=y
181CONFIG_RELAY=y 182CONFIG_RELAY=y
183# CONFIG_BLK_DEV_INITRD is not set
182# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
183CONFIG_SYSCTL=y 185CONFIG_SYSCTL=y
184CONFIG_EMBEDDED=y 186CONFIG_EMBEDDED=y
@@ -477,7 +479,6 @@ CONFIG_BLK_DEV_LOOP=y
477# CONFIG_BLK_DEV_NBD is not set 479# CONFIG_BLK_DEV_NBD is not set
478# CONFIG_BLK_DEV_SX8 is not set 480# CONFIG_BLK_DEV_SX8 is not set
479# CONFIG_BLK_DEV_RAM is not set 481# CONFIG_BLK_DEV_RAM is not set
480# CONFIG_BLK_DEV_INITRD is not set
481CONFIG_CDROM_PKTCDVD=y 482CONFIG_CDROM_PKTCDVD=y
482CONFIG_CDROM_PKTCDVD_BUFFERS=8 483CONFIG_CDROM_PKTCDVD_BUFFERS=8
483# CONFIG_CDROM_PKTCDVD_WCACHE is not set 484# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -518,7 +519,7 @@ CONFIG_BLK_DEV_IDEPCI=y
518# CONFIG_BLK_DEV_OPTI621 is not set 519# CONFIG_BLK_DEV_OPTI621 is not set
519CONFIG_BLK_DEV_IDEDMA_PCI=y 520CONFIG_BLK_DEV_IDEDMA_PCI=y
520# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 521# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
521# CONFIG_IDEDMA_PCI_AUTO is not set 522# CONFIG_IDEDMA_ONLYDISK is not set
522# CONFIG_BLK_DEV_AEC62XX is not set 523# CONFIG_BLK_DEV_AEC62XX is not set
523# CONFIG_BLK_DEV_ALI15X3 is not set 524# CONFIG_BLK_DEV_ALI15X3 is not set
524# CONFIG_BLK_DEV_AMD74XX is not set 525# CONFIG_BLK_DEV_AMD74XX is not set
@@ -546,7 +547,6 @@ CONFIG_BLK_DEV_TC86C001=y
546# CONFIG_IDE_ARM is not set 547# CONFIG_IDE_ARM is not set
547CONFIG_BLK_DEV_IDEDMA=y 548CONFIG_BLK_DEV_IDEDMA=y
548# CONFIG_IDEDMA_IVB is not set 549# CONFIG_IDEDMA_IVB is not set
549# CONFIG_IDEDMA_AUTO is not set
550# CONFIG_BLK_DEV_HD is not set 550# CONFIG_BLK_DEV_HD is not set
551 551
552# 552#
@@ -779,7 +779,8 @@ CONFIG_LEGACY_PTY_COUNT=256
779# 779#
780# CONFIG_WATCHDOG is not set 780# CONFIG_WATCHDOG is not set
781# CONFIG_HW_RANDOM is not set 781# CONFIG_HW_RANDOM is not set
782CONFIG_RTC=y 782# CONFIG_RTC is not set
783# CONFIG_GEN_RTC is not set
783CONFIG_COBALT_LCD=y 784CONFIG_COBALT_LCD=y
784# CONFIG_DTLK is not set 785# CONFIG_DTLK is not set
785# CONFIG_R3964 is not set 786# CONFIG_R3964 is not set
@@ -815,6 +816,11 @@ CONFIG_COBALT_LCD=y
815# CONFIG_HWMON_VID is not set 816# CONFIG_HWMON_VID is not set
816 817
817# 818#
819# Multifunction device drivers
820#
821# CONFIG_MFD_SM501 is not set
822
823#
818# Multimedia devices 824# Multimedia devices
819# 825#
820# CONFIG_VIDEO_DEV is not set 826# CONFIG_VIDEO_DEV is not set
@@ -827,7 +833,7 @@ CONFIG_COBALT_LCD=y
827# 833#
828# Graphics support 834# Graphics support
829# 835#
830# CONFIG_FIRMWARE_EDID is not set 836# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
831# CONFIG_FB is not set 837# CONFIG_FB is not set
832 838
833# 839#
@@ -835,7 +841,6 @@ CONFIG_COBALT_LCD=y
835# 841#
836# CONFIG_VGA_CONSOLE is not set 842# CONFIG_VGA_CONSOLE is not set
837CONFIG_DUMMY_CONSOLE=y 843CONFIG_DUMMY_CONSOLE=y
838# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
839 844
840# 845#
841# Sound 846# Sound
@@ -894,7 +899,29 @@ CONFIG_USB_ARCH_HAS_EHCI=y
894# 899#
895# Real Time Clock 900# Real Time Clock
896# 901#
897# CONFIG_RTC_CLASS is not set 902CONFIG_RTC_LIB=y
903CONFIG_RTC_CLASS=y
904CONFIG_RTC_HCTOSYS=y
905CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
906# CONFIG_RTC_DEBUG is not set
907
908#
909# RTC interfaces
910#
911CONFIG_RTC_INTF_SYSFS=y
912CONFIG_RTC_INTF_PROC=y
913CONFIG_RTC_INTF_DEV=y
914# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
915
916#
917# RTC drivers
918#
919CONFIG_RTC_DRV_CMOS=y
920# CONFIG_RTC_DRV_DS1553 is not set
921# CONFIG_RTC_DRV_DS1742 is not set
922# CONFIG_RTC_DRV_M48T86 is not set
923# CONFIG_RTC_DRV_TEST is not set
924# CONFIG_RTC_DRV_V3020 is not set
898 925
899# 926#
900# DMA Engine support 927# DMA Engine support