linux-mips
[Top] [All Lists]

[PATCH 2/5] MIPS: remove unused resources for cobalt

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH 2/5] MIPS: remove unused resources for cobalt
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Fri, 1 Dec 2006 22:16:01 +0900
Cc: yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
In-reply-to: <20061201221242.261f57b0.yoichi_yuasa@tripeaks.co.jp>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20061201221242.261f57b0.yoichi_yuasa@tripeaks.co.jp>
Sender: linux-mips-bounce@linux-mips.org
Hi Ralf,

This patch has removed unused resources for cobalt.

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/setup.c 
mips/arch/mips/cobalt/setup.c
--- mips-orig/arch/mips/cobalt/setup.c  2006-10-12 01:03:59.401472250 +0900
+++ mips/arch/mips/cobalt/setup.c       2006-10-12 01:05:36.454992750 +0900
@@ -79,37 +79,19 @@ static struct resource cobalt_io_resourc
        .flags  = IORESOURCE_IO
 };
 
-static struct resource cobalt_io_resources[] = {
-       {
-               .start  = 0x00,
-               .end    = 0x1f,
-               .name   = "dma1",
-               .flags  = IORESOURCE_BUSY
-       }, {
-               .start  = 0x40,
-               .end    = 0x5f,
-               .name   = "timer",
-               .flags  = IORESOURCE_BUSY
-       }, {
+/*
+ * Cobalt doesn't have PS/2 keyboard/mouse interfaces,
+ * keyboard conntroller is never used.
+ */
+static struct resource cobalt_reserved_resources[] = {
+       {       /* keyboard */
                .start  = 0x60,
                .end    = 0x6f,
-               .name   = "keyboard",
-               .flags  = IORESOURCE_BUSY
-       }, {
-               .start  = 0x80,
-               .end    = 0x8f,
-               .name   = "dma page reg",
-               .flags  = IORESOURCE_BUSY
-       }, {
-               .start  = 0xc0,
-               .end    = 0xdf,
-               .name   = "dma2",
-               .flags  = IORESOURCE_BUSY
+               .name   = "reserved",
+               .flags  = IORESOURCE_BUSY,
        },
 };
 
-#define COBALT_IO_RESOURCES (sizeof(cobalt_io_resources)/sizeof(struct 
resource))
-
 static struct pci_controller cobalt_pci_controller = {
        .pci_ops        = &gt64111_pci_ops,
        .mem_resource   = &cobalt_mem_resource,
@@ -132,9 +114,9 @@ void __init plat_mem_setup(void)
 
        ioport_resource.end = 0xffff;
 
-       /* request I/O space for devices used on all i[345]86 PCs */
-       for (i = 0; i < COBALT_IO_RESOURCES; i++)
-               request_resource(&ioport_resource, cobalt_io_resources + i);
+       /* These resources have been reserved by VIA SuperI/O chip. */
+       for (i = 0; i < ARRAY_SIZE(cobalt_reserved_resources); i++)
+               request_resource(&ioport_resource, cobalt_reserved_resources + 
i);
 
         /* Read the cobalt id register out of the PCI config space */
         PCI_CFG_SET(devfn, (VIA_COBALT_BRD_ID_REG & ~0x3));

<Prev in Thread] Current Thread [Next in Thread>