aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sni/pcit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/sni/pcit.c')
-rw-r--r--arch/mips/sni/pcit.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c
index 00d151f4d121..2480c478dcbd 100644
--- a/arch/mips/sni/pcit.c
+++ b/arch/mips/sni/pcit.c
@@ -13,7 +13,6 @@
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15 15
16#include <asm/mc146818-time.h>
17#include <asm/sni.h> 16#include <asm/sni.h>
18#include <asm/time.h> 17#include <asm/time.h>
19#include <asm/irq_cpu.h> 18#include <asm/irq_cpu.h>
@@ -58,6 +57,25 @@ static struct platform_device pcit_cplus_serial8250_device = {
58 }, 57 },
59}; 58};
60 59
60static struct resource pcit_cmos_rsrc[] = {
61 {
62 .start = 0x70,
63 .end = 0x71,
64 .flags = IORESOURCE_IO
65 },
66 {
67 .start = 8,
68 .end = 8,
69 .flags = IORESOURCE_IRQ
70 }
71};
72
73static struct platform_device pcit_cmos_device = {
74 .name = "rtc_cmos",
75 .num_resources = ARRAY_SIZE(pcit_cmos_rsrc),
76 .resource = pcit_cmos_rsrc
77};
78
61static struct resource sni_io_resource = { 79static struct resource sni_io_resource = {
62 .start = 0x00000000UL, 80 .start = 0x00000000UL,
63 .end = 0x03bfffffUL, 81 .end = 0x03bfffffUL,
@@ -243,10 +261,8 @@ void __init sni_pcit_cplus_irq_init(void)
243 setup_irq (MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq); 261 setup_irq (MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq);
244} 262}
245 263
246void sni_pcit_init(void) 264void __init sni_pcit_init(void)
247{ 265{
248 rtc_mips_get_time = mc146818_get_cmos_time;
249 rtc_mips_set_time = mc146818_set_rtc_mmss;
250 board_time_init = sni_cpu_time_init; 266 board_time_init = sni_cpu_time_init;
251 ioport_resource.end = sni_io_resource.end; 267 ioport_resource.end = sni_io_resource.end;
252#ifdef CONFIG_PCI 268#ifdef CONFIG_PCI
@@ -261,10 +277,12 @@ static int __init snirm_pcit_setup_devinit(void)
261 switch (sni_brd_type) { 277 switch (sni_brd_type) {
262 case SNI_BRD_PCI_TOWER: 278 case SNI_BRD_PCI_TOWER:
263 platform_device_register(&pcit_serial8250_device); 279 platform_device_register(&pcit_serial8250_device);
280 platform_device_register(&pcit_cmos_device);
264 break; 281 break;
265 282
266 case SNI_BRD_PCI_TOWER_CPLUS: 283 case SNI_BRD_PCI_TOWER_CPLUS:
267 platform_device_register(&pcit_cplus_serial8250_device); 284 platform_device_register(&pcit_cplus_serial8250_device);
285 platform_device_register(&pcit_cmos_device);
268 break; 286 break;
269 } 287 }
270 return 0; 288 return 0;