Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58660
b: refs/heads/master
c: 06cf558
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Bogendoerfer authored and Ralf Baechle committed Jul 10, 2007
1 parent a2d426f commit 6714fba
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 116 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68bc00e31143ad8bfa435425e0a11e9b3998911d
refs/heads/master: 06cf5583fd9ac782cf34996cdabb48afdf478e37
4 changes: 2 additions & 2 deletions trunk/arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -918,8 +918,8 @@ config BOOT_ELF32

config MIPS_L1_CACHE_SHIFT
int
default "4" if MACH_DECSTATION || SNI_RM
default "7" if SGI_IP27
default "4" if MACH_DECSTATION
default "7" if SGI_IP27 || SNI_RM
default "4" if PMC_MSP4200_EVAL
default "5"

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/sni/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Makefile for the SNI specific part of the kernel
#

obj-y += irq.o reset.o setup.o ds1216.o a20r.o rm200.o pcimt.o pcit.o time.o
obj-y += irq.o reset.o setup.o a20r.o rm200.o pcimt.o pcit.o time.o
obj-$(CONFIG_CPU_BIG_ENDIAN) += sniprom.o
31 changes: 22 additions & 9 deletions trunk/arch/mips/sni/a20r.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <asm/sni.h>
#include <asm/time.h>
#include <asm/ds1216.h>

#define PORT(_base,_irq) \
{ \
Expand All @@ -40,20 +39,34 @@ static struct platform_device a20r_serial8250_device = {
},
};

static struct resource a20r_ds1216_rsrc[] = {
{
.start = 0x1c081ffc,
.end = 0x1c081fff,
.flags = IORESOURCE_MEM
}
};

static struct platform_device a20r_ds1216_device = {
.name = "rtc-ds1216",
.num_resources = ARRAY_SIZE(a20r_ds1216_rsrc),
.resource = a20r_ds1216_rsrc
};

static struct resource snirm_82596_rsrc[] = {
{
.start = 0xb8000000,
.end = 0xb8000004,
.start = 0x18000000,
.end = 0x18000004,
.flags = IORESOURCE_MEM
},
{
.start = 0xb8010000,
.end = 0xb8010004,
.start = 0x18010000,
.end = 0x18010004,
.flags = IORESOURCE_MEM
},
{
.start = 0xbff00000,
.end = 0xbff00020,
.start = 0x1ff00000,
.end = 0x1ff00020,
.flags = IORESOURCE_MEM
},
{
Expand Down Expand Up @@ -205,8 +218,7 @@ void __init sni_a20r_irq_init(void)

void sni_a20r_init(void)
{
ds1216_base = (volatile unsigned char *) SNI_DS1216_A20R_BASE;
rtc_mips_get_time = ds1216_get_cmos_time;
/* FIXME, remove if not needed */
}

static int __init snirm_a20r_setup_devinit(void)
Expand All @@ -218,6 +230,7 @@ static int __init snirm_a20r_setup_devinit(void)
platform_device_register(&snirm_53c710_pdev);
platform_device_register(&sc26xx_pdev);
platform_device_register(&a20r_serial8250_device);
platform_device_register(&a20r_ds1216_device);
break;
}

Expand Down
81 changes: 0 additions & 81 deletions trunk/arch/mips/sni/ds1216.c

This file was deleted.

26 changes: 22 additions & 4 deletions trunk/arch/mips/sni/pcimt.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <linux/pci.h>
#include <linux/serial_8250.h>

#include <asm/mc146818-time.h>
#include <asm/sni.h>
#include <asm/time.h>
#include <asm/i8259.h>
Expand Down Expand Up @@ -90,6 +89,26 @@ static struct platform_device pcimt_serial8250_device = {
},
};

static struct resource pcimt_cmos_rsrc[] = {
{
.start = 0x70,
.end = 0x71,
.flags = IORESOURCE_IO
},
{
.start = 8,
.end = 8,
.flags = IORESOURCE_IRQ
}
};

static struct platform_device pcimt_cmos_device = {
.name = "rtc_cmos",
.num_resources = ARRAY_SIZE(pcimt_cmos_rsrc),
.resource = pcimt_cmos_rsrc
};


static struct resource sni_io_resource = {
.start = 0x00000000UL,
.end = 0x03bfffffUL,
Expand Down Expand Up @@ -290,12 +309,10 @@ void __init sni_pcimt_irq_init(void)
change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3);
}

void sni_pcimt_init(void)
void __init sni_pcimt_init(void)
{
sni_pcimt_detect();
sni_pcimt_sc_init();
rtc_mips_get_time = mc146818_get_cmos_time;
rtc_mips_set_time = mc146818_set_rtc_mmss;
board_time_init = sni_cpu_time_init;
ioport_resource.end = sni_io_resource.end;
#ifdef CONFIG_PCI
Expand All @@ -312,6 +329,7 @@ static int __init snirm_pcimt_setup_devinit(void)
case SNI_BRD_PCI_DESKTOP:
case SNI_BRD_PCI_MTOWER_CPLUS:
platform_device_register(&pcimt_serial8250_device);
platform_device_register(&pcimt_cmos_device);
break;
}

Expand Down
26 changes: 22 additions & 4 deletions trunk/arch/mips/sni/pcit.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/pci.h>
#include <linux/serial_8250.h>

#include <asm/mc146818-time.h>
#include <asm/sni.h>
#include <asm/time.h>
#include <asm/irq_cpu.h>
Expand Down Expand Up @@ -58,6 +57,25 @@ static struct platform_device pcit_cplus_serial8250_device = {
},
};

static struct resource pcit_cmos_rsrc[] = {
{
.start = 0x70,
.end = 0x71,
.flags = IORESOURCE_IO
},
{
.start = 8,
.end = 8,
.flags = IORESOURCE_IRQ
}
};

static struct platform_device pcit_cmos_device = {
.name = "rtc_cmos",
.num_resources = ARRAY_SIZE(pcit_cmos_rsrc),
.resource = pcit_cmos_rsrc
};

static struct resource sni_io_resource = {
.start = 0x00000000UL,
.end = 0x03bfffffUL,
Expand Down Expand Up @@ -243,10 +261,8 @@ void __init sni_pcit_cplus_irq_init(void)
setup_irq (MIPS_CPU_IRQ_BASE + 3, &sni_isa_irq);
}

void sni_pcit_init(void)
void __init sni_pcit_init(void)
{
rtc_mips_get_time = mc146818_get_cmos_time;
rtc_mips_set_time = mc146818_set_rtc_mmss;
board_time_init = sni_cpu_time_init;
ioport_resource.end = sni_io_resource.end;
#ifdef CONFIG_PCI
Expand All @@ -261,10 +277,12 @@ static int __init snirm_pcit_setup_devinit(void)
switch (sni_brd_type) {
case SNI_BRD_PCI_TOWER:
platform_device_register(&pcit_serial8250_device);
platform_device_register(&pcit_cmos_device);
break;

case SNI_BRD_PCI_TOWER_CPLUS:
platform_device_register(&pcit_cplus_serial8250_device);
platform_device_register(&pcit_cmos_device);
break;
}
return 0;
Expand Down
32 changes: 22 additions & 10 deletions trunk/arch/mips/sni/rm200.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <asm/sni.h>
#include <asm/time.h>
#include <asm/ds1216.h>
#include <asm/irq_cpu.h>

#define PORT(_base,_irq) \
Expand All @@ -41,20 +40,34 @@ static struct platform_device rm200_serial8250_device = {
},
};

static struct resource rm200_ds1216_rsrc[] = {
{
.start = 0x1cd41ffc,
.end = 0x1cd41fff,
.flags = IORESOURCE_MEM
}
};

static struct platform_device rm200_ds1216_device = {
.name = "rtc-ds1216",
.num_resources = ARRAY_SIZE(rm200_ds1216_rsrc),
.resource = rm200_ds1216_rsrc
};

static struct resource snirm_82596_rm200_rsrc[] = {
{
.start = 0xb8000000,
.end = 0xb80fffff,
.start = 0x18000000,
.end = 0x180fffff,
.flags = IORESOURCE_MEM
},
{
.start = 0xbb000000,
.end = 0xbb000004,
.start = 0x1b000000,
.end = 0x1b000004,
.flags = IORESOURCE_MEM
},
{
.start = 0xbff00000,
.end = 0xbff00020,
.start = 0x1ff00000,
.end = 0x1ff00020,
.flags = IORESOURCE_MEM
},
{
Expand Down Expand Up @@ -96,6 +109,7 @@ static int __init snirm_setup_devinit(void)
{
if (sni_brd_type == SNI_BRD_RM200) {
platform_device_register(&rm200_serial8250_device);
platform_device_register(&rm200_ds1216_device);
platform_device_register(&snirm_82596_rm200_pdev);
platform_device_register(&snirm_53c710_rm200_pdev);
}
Expand Down Expand Up @@ -176,11 +190,9 @@ void __init sni_rm200_irq_init(void)
setup_irq (SNI_RM200_INT_START + 0, &sni_isa_irq);
}

void sni_rm200_init(void)
void __init sni_rm200_init(void)
{
set_io_port_base(SNI_PORT_BASE + 0x02000000);
ioport_resource.end += 0x02000000;
ds1216_base = (volatile unsigned char *) SNI_DS1216_RM200_BASE;
rtc_mips_get_time = ds1216_get_cmos_time;
board_time_init = sni_cpu_time_init;
}
5 changes: 4 additions & 1 deletion trunk/arch/mips/sni/sniprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ static void __init sni_console_setup(void)
}
if (baud)
strcpy(options, baud);
add_preferred_console("ttyS", port, baud ? options : NULL);
if (strncmp (cdev, "tty552", 6) == 0)
add_preferred_console("ttyS", port, baud ? options : NULL);
else
add_preferred_console("ttySC", port, baud ? options : NULL);
}
}

Expand Down
3 changes: 0 additions & 3 deletions trunk/include/asm-mips/sni.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ extern unsigned int sni_brd_type;
#define SNI_A20R_IRQ_BASE MIPS_CPU_IRQ_BASE
#define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5)

#define SNI_DS1216_A20R_BASE 0xbc081ffc
#define SNI_DS1216_RM200_BASE 0xbcd41ffc

#define SNI_PCIT_INT_REG 0xbfff000c

#define SNI_PCIT_INT_START 24
Expand Down

0 comments on commit 6714fba

Please sign in to comment.