From f05fab340298536393c015f1bd6ac1c6b8446590 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 16 Feb 2000 01:45:55 +0000 Subject: DDB 5074 updates from Geert. --- arch/mips/ddb5074/pci.c | 31 +++++++++++++------------------ drivers/char/serial.c | 17 ++++++++++++++--- include/asm-mips/io.h | 20 ++++++++++---------- include/asm-mips/serial.h | 14 ++------------ 4 files changed, 39 insertions(+), 43 deletions(-) diff --git a/arch/mips/ddb5074/pci.c b/arch/mips/ddb5074/pci.c index 63a7271dc..37faaa808 100644 --- a/arch/mips/ddb5074/pci.c +++ b/arch/mips/ddb5074/pci.c @@ -5,7 +5,7 @@ * Albert Dorofeev * Sony Suprastructure Center Europe (SUPC-E), Brussels * - * $Id: pci.c,v 1.1 2000/01/26 00:07:44 ralf Exp $ + * $Id: pci.c,v 1.2 2000/02/14 17:07:36 ralf Exp $ */ #include @@ -205,23 +205,6 @@ void pcibios_init(void) ioport_resource.end = 0x1ffffff; pci_scan_bus(0, &nile4_pci_ops, NULL); pcibios_claim_resources(&pci_root_buses); - -#if 0 - { - char buf[PAGE_SIZE]; - printk("*** PCI Devices ***\n"); - get_pci_list(buf); - printk(buf); - printk("*** PCI I/O Space ***\n"); - buf[0] = '\0'; - get_ioport_list(buf); - printk(buf); - printk("*** PCI Memory ***\n"); - buf[0] = '\0'; - get_mem_list(buf); - printk(buf); - } -#endif } void pcibios_fixup_bus(struct pci_bus *bus) @@ -289,6 +272,18 @@ void pcibios_fixup_bus(struct pci_bus *bus) nile4_pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, dev->resource[0].start); break; + case 5: + printk("[onboard] NEC Vrc-5074 Nile 4 Host Bridge\n"); + /* + * Fixup so the serial driver can use the UART + */ + dev->irq = nile4_to_irq(NILE4_INT_UART); + dev->resource[0].start = PHYSADDR(NILE4_BASE); + dev->resource[0].end = dev->resource[0].start+NILE4_SIZE-1; + dev->resource[0].flags = IORESOURCE_MEM | + PCI_BASE_ADDRESS_MEM_TYPE_64; + + break; case 10: printk("[onboard] Acer Labs M7101 PMU\n"); pci_pmu = dev; diff --git a/drivers/char/serial.c b/drivers/char/serial.c index c5e2787d5..c9c5a890c 100644 --- a/drivers/char/serial.c +++ b/drivers/char/serial.c @@ -3978,6 +3978,16 @@ static struct pci_board pci_boards[] = { { PCI_VENDOR_ID_USR, 0x1006, 0x12b9, 0x0060, SPCI_FL_BASE1 | SPCI_FL_IOMEM, 1, 115200 }, +#ifdef CONFIG_DDB5074 + /* + * NEC Vrc-5074 (Nile 4) builtin UART. + * Conditionally compiled in since this is a motherboard device. + */ + { PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NILE4, + PCI_ANY_ID, PCI_ANY_ID, + SPCI_FL_BASE0 | SPCI_FL_IOMEM, 1, 520833, + 64, 3, NULL, 0x300 }, +#endif { 0, } }; @@ -4022,7 +4032,8 @@ static void probe_serial_pci(void) #ifdef SERIAL_DEBUG_PCI printk(KERN_DEBUG "Found unknown serial board: %x:%x, %x:%x, %x\n", - dev->vendor, dev->device, subvendor, subdevice, + dev->vendor, dev->device, dev->subsystem_vendor, + dev->subsystem_device, dev->class); printk(KERN_DEBUG " Addresses: %lx, %lx, %lx, %lx\n", @@ -4082,8 +4093,8 @@ static void probe_serial_pci(void) #ifdef SERIAL_DEBUG_PCI printk(KERN_DEBUG "Found Serial PCI device: %x:%x, %x:%x, %x\n", - dev->vendor, dev->device, subvendor, subdevice, - dev->class); + dev->vendor, dev->device, dev->subsystem_vendor, + dev->subsystem_device, dev->class); printk(KERN_DEBUG " IRQ: %d, base: %lx (%s), num_ports: %d\n", dev->irq, port, board->flags & SPCI_FL_IOMEM ? diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index a881f2b06..c02ddfd86 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h @@ -1,4 +1,4 @@ -/* $Id: io.h,v 1.10 2000/01/29 01:42:28 ralf Exp $ +/* $Id: io.h,v 1.11 2000/02/04 07:40:53 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -153,23 +153,23 @@ extern inline void iounmap(void *addr) * 24-31 on SNI. * XXX more SNI hacks. */ -#define readb(addr) (*(volatile unsigned char *) (0xa0000000 + (unsigned long)(addr))) -#define readw(addr) (*(volatile unsigned short *) (0xa0000000 + (unsigned long)(addr))) -#define readl(addr) (*(volatile unsigned int *) (0xa0000000 + (unsigned long)(addr))) +#define readb(addr) (*(volatile unsigned char *)(addr)) +#define readw(addr) (*(volatile unsigned short *)(addr)) +#define readl(addr) (*(volatile unsigned int *)(addr)) #define __raw_readb readb #define __raw_readw readw #define __raw_readl readl -#define writeb(b,addr) (*(volatile unsigned char *) (0xa0000000 + (unsigned long)(addr)) = (b)) -#define writew(b,addr) (*(volatile unsigned short *) (0xa0000000 + (unsigned long)(addr)) = (b)) -#define writel(b,addr) (*(volatile unsigned int *) (0xa0000000 + (unsigned long)(addr)) = (b)) +#define writeb(b,addr) (*(volatile unsigned char *)(addr)) = (b) +#define writew(b,addr) (*(volatile unsigned short *)(addr)) = (b) +#define writel(b,addr) (*(volatile unsigned int *)(addr)) = (b) #define __raw_writeb writeb #define __raw_writew writew #define __raw_writel writel -#define memset_io(a,b,c) memset((void *)(0xa0000000 + (unsigned long)a),(b),(c)) -#define memcpy_fromio(a,b,c) memcpy((a),(void *)(0xa0000000 + (unsigned long)(b)),(c)) -#define memcpy_toio(a,b,c) memcpy((void *)(0xa0000000 + (unsigned long)(a)),(b),(c)) +#define memset_io(a,b,c) memset((void *)(a),(b),(c)) +#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) +#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) /* END SNI HACKS ... */ diff --git a/include/asm-mips/serial.h b/include/asm-mips/serial.h index 3fbefe683..b01e435f7 100644 --- a/include/asm-mips/serial.h +++ b/include/asm-mips/serial.h @@ -1,4 +1,4 @@ -/* $Id: serial.h,v 1.7 2000/01/31 03:44:29 ralf Exp $ +/* $Id: serial.h,v 1.8 2000/02/04 07:40:53 ralf Exp $ * * Copyright (C) 1999 by Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. @@ -147,18 +147,8 @@ #define MCA_SERIAL_PORT_DFNS #endif -#ifdef CONFIG_DDB5074 -#define DDB5074_SERIAL_PORT_DEFNS \ - { 0, 520833, 0, 20, \ - STD_COM_FLAGS, 0, 0, 0, 0, 0, 0, 0, \ - (u8 *)0xbfa00300, 3 } -#else -#define DDB5074_SERIAL_PORT_DEFNS -#endif - #define SERIAL_PORT_DFNS \ JAZZ_SERIAL_PORT_DEFNS \ STD_SERIAL_PORT_DEFNS \ EXTRA_SERIAL_PORT_DEFNS \ - HUB6_SERIAL_PORT_DFNS \ - DDB5074_SERIAL_PORT_DEFNS + HUB6_SERIAL_PORT_DFNS -- cgit v1.2.3