Update of /cvsroot/linux-mips/linux/arch/mips/vr41xx/vr4122/mp-c303
In directory usw-pr-cvs1:/tmp/cvs-serv32248/arch/mips/vr41xx/vr4122/mp-c303
Modified Files:
init.c pci_fixup.c setup.c
Log Message:
Merge yoichi-san's vr41xx patch. Still some cleanups needed..
Index: init.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/vr41xx/vr4122/mp-c303/init.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- init.c 7 Mar 2002 03:16:54 -0000 1.1
+++ init.c 12 Jul 2002 20:14:28 -0000 1.2
@@ -1,6 +1,6 @@
/*
* FILE NAME
- * arch/mips/vr41xx/mp-c303/init.c
+ * arch/mips/vr41xx/vr4122/mp-c303/init.c
*
* BRIEF MODULE DESCRIPTION
* Initialisation code for the Victor MP-C303/304.
@@ -43,11 +43,6 @@
if (i < (argc - 1))
strcat(arcs_cmdline, " ");
}
-
-#if defined(CONFIG_SERIAL_CONSOLE)
- /* to use 38400 ttyS0 serial console */
- strcat(arcs_cmdline, " console=ttyS0,38400");
-#endif
mips_machgroup = MACH_GROUP_NEC_VR41XX;
mips_machtype = MACH_VICTOR_MPC303;
Index: pci_fixup.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/vr41xx/vr4122/mp-c303/pci_fixup.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- pci_fixup.c 7 Mar 2002 03:16:54 -0000 1.1
+++ pci_fixup.c 12 Jul 2002 20:14:28 -0000 1.2
@@ -1,6 +1,6 @@
/*
* FILE NAME
- * arch/mips/vr41xx/mp-c303/pci_fixup.c
+ * arch/mips/vr41xx/vr4122/mp-c303/pci_fixup.c
*
* BRIEF MODULE DESCRIPTION
* The Victor MP-C303/304 specific PCI fixups.
@@ -14,38 +14,14 @@
* option) any later version.
*/
#include <linux/config.h>
-
-#ifdef CONFIG_PCI
#include <linux/init.h>
#include <linux/pci.h>
-#include <asm/pci_channel.h>
#include <asm/vr41xx/mp-c303.h>
#ifdef CONFIG_VRC4173
#include <asm/vr41xx/vrc4173.h>
#endif
-static struct resource vr41xx_pci_io_resource = {
- "PCI I/O space",
- VR41XX_PCI_IO_START,
- VR41XX_PCI_IO_END,
- IORESOURCE_IO
-};
-
-static struct resource vr41xx_pci_mem_resource = {
- "PCI memory space",
- VR41XX_PCI_MEM_START,
- VR41XX_PCI_MEM_END,
- IORESOURCE_MEM
-};
-
-extern struct pci_ops vr41xx_pci_ops;
-
-struct pci_channel mips_pci_channels[] = {
- {&vr41xx_pci_ops, &vr41xx_pci_io_resource, &vr41xx_pci_mem_resource, 0, 256},
- {NULL, NULL, NULL, 0, 0}
-};
-
void __init pcibios_fixup_resources(struct pci_dev *dev)
{
}
@@ -66,6 +42,12 @@
switch (slot) {
#ifdef CONFIG_VRC4173
+ case 12:
+ dev->irq = VRC4173_CARDU1_IRQ;
+ break;
+ case 13:
+ dev->irq = VRC4173_CARDU2_IRQ;
+ break;
case 24:
dev->irq = VRC4173_CARDU1_IRQ;
break;
@@ -96,5 +78,3 @@
{
return 0;
}
-
-#endif
Index: setup.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/vr41xx/vr4122/mp-c303/setup.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- setup.c 7 Mar 2002 03:16:54 -0000 1.1
+++ setup.c 12 Jul 2002 20:14:28 -0000 1.2
@@ -1,6 +1,6 @@
/*
* FILE NAME
- * arch/mips/vr41xx/mp-c303/setup.c
+ * arch/mips/vr41xx/vr4122/mp-c303/setup.c
*
* BRIEF MODULE DESCRIPTION
* Setup for the Victor MP-C303/304.
@@ -19,6 +19,7 @@
#include <linux/ide.h>
#include <linux/ioport.h>
+#include <asm/pci_channel.h>
#include <asm/reboot.h>
#include <asm/time.h>
#include <asm/vr41xx/mp-c303.h>
@@ -32,13 +33,60 @@
extern struct ide_ops mpc303_ide_ops;
#endif
+#ifdef CONFIG_PCI
+static struct resource vr41xx_pci_io_resource = {
+ "PCI I/O space",
+ VR41XX_PCI_IO_START,
+ VR41XX_PCI_IO_END,
+ IORESOURCE_IO
+};
+
+static struct resource vr41xx_pci_mem_resource = {
+ "PCI memory space",
+ VR41XX_PCI_MEM_START,
+ VR41XX_PCI_MEM_END,
+ IORESOURCE_MEM
+};
+
+extern struct pci_ops vr41xx_pci_ops;
+
+struct pci_channel mips_pci_channels[] = {
+ {&vr41xx_pci_ops, &vr41xx_pci_io_resource, &vr41xx_pci_mem_resource, 0, 256},
+ {NULL, NULL, NULL, 0, 0}
+};
+
+struct vr41xx_pci_address_space vr41xx_pci_mem1 = {
+ VR41XX_PCI_MEM1_BASE,
+ VR41XX_PCI_MEM1_MASK,
+ IO_MEM1_RESOURCE_START
+};
+
+struct vr41xx_pci_address_space vr41xx_pci_mem2 = {
+ VR41XX_PCI_MEM2_BASE,
+ VR41XX_PCI_MEM2_MASK,
+ IO_MEM2_RESOURCE_START
+};
+
+struct vr41xx_pci_address_space vr41xx_pci_io = {
+ VR41XX_PCI_IO_BASE,
+ VR41XX_PCI_IO_MASK,
+ IO_PORT_RESOURCE_START
+};
+
+static struct vr41xx_pci_address_map pci_address_map = {
+ &vr41xx_pci_mem1,
+ &vr41xx_pci_mem2,
+ &vr41xx_pci_io
+};
+#endif
+
void __init nec_vr41xx_setup(void)
{
set_io_port_base(IO_PORT_BASE);
ioport_resource.start = IO_PORT_RESOURCE_START;
ioport_resource.end = IO_PORT_RESOURCE_END;
- iomem_resource.start = IO_MEM_RESOURCE_START;
- iomem_resource.end = IO_MEM_RESOURCE_END;
+ iomem_resource.start = IO_MEM1_RESOURCE_START;
+ iomem_resource.end = IO_MEM2_RESOURCE_END;
#ifdef CONFIG_BLK_DEV_INITRD
ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
@@ -63,10 +111,12 @@
vr41xx_bcu_init();
- vr41xx_siu_init(0, SIU_RS232C, 0);
+ vr41xx_cmu_init(0);
+
+ vr41xx_siu_init(SIU_RS232C, 0);
#ifdef CONFIG_PCI
- vr41xx_pciu_init();
+ vr41xx_pciu_init(&pci_address_map);
#endif
#ifdef CONFIG_VRC4173
|