[MIPS] C99-ify struct resource initialization.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Ralf Baechle
2006-06-04 15:14:05 -07:00
parent cbb306962e
commit 5e46c3aefe
18 changed files with 395 additions and 150 deletions

View File

@@ -50,30 +50,28 @@
static struct resource pci_mem_resource_1;
static struct resource pci_io_resource = {
"io pci IO space",
0x14018000,
0x17FFFFFF,
IORESOURCE_IO
.start = 0x14018000,
.end = 0x17FFFFFF,
.name = "io pci IO space",
.flags = IORESOURCE_IO
};
static struct resource pci_mem_resource_0 = {
"ext pci memory space 0/1",
0x10101000,
0x13FFFFFF,
IORESOURCE_MEM,
&pci_mem_resource_0,
NULL,
&pci_mem_resource_1
.start = 0x10101000,
.end = 0x13FFFFFF,
.name = "ext pci memory space 0/1",
.flags = IORESOURCE_MEM,
.parent = &pci_mem_resource_0,
.sibling = NULL,
.child = &pci_mem_resource_1
};
static struct resource pci_mem_resource_1 = {
"ext pci memory space 2/3",
0x1A000000,
0x1FBFFFFF,
IORESOURCE_MEM,
&pci_mem_resource_0,
NULL,
NULL
.start = 0x1A000000,
.end = 0x1FBFFFFF,
.name = "ext pci memory space 2/3",
.flags = IORESOURCE_MEM,
.parent = &pci_mem_resource_0
};
extern struct pci_ops it8172_pci_ops;

View File

@@ -8,17 +8,17 @@
#include <asm/ddb5xxx/ddb5xxx.h>
static struct resource extpci_io_resource = {
"pci IO space",
0x1000, /* leave some room for ISA bus */
DDB_PCI_IO_SIZE - 1,
IORESOURCE_IO
.start = 0x1000, /* leave some room for ISA bus */
.end = DDB_PCI_IO_SIZE - 1,
.name = "pci IO space",
.flags = IORESOURCE_IO
};
static struct resource extpci_mem_resource = {
"pci memory space",
DDB_PCI_MEM_BASE + 0x00100000, /* leave 1 MB for RTC */
DDB_PCI_MEM_BASE + DDB_PCI_MEM_SIZE - 1,
IORESOURCE_MEM
.start = DDB_PCI_MEM_BASE + 0x00100000, /* leave 1 MB for RTC */
.end = DDB_PCI_MEM_BASE + DDB_PCI_MEM_SIZE - 1,
.name = "pci memory space",
.flags = IORESOURCE_MEM
};
extern struct pci_ops ddb5476_ext_pci_ops;

View File

@@ -8,17 +8,17 @@
#include <asm/ddb5xxx/ddb5xxx.h>
static struct resource extpci_io_resource = {
"pci IO space",
0x1000, /* leave some room for ISA bus */
DDB_PCI_IO_SIZE - 1,
IORESOURCE_IO
.start = 0x1000, /* leave some room for ISA bus */
.end = DDB_PCI_IO_SIZE - 1,
.name = "pci IO space",
.flags = IORESOURCE_IO
};
static struct resource extpci_mem_resource = {
"pci memory space",
DDB_PCI_MEM_BASE + 0x00100000, /* leave 1 MB for RTC */
DDB_PCI_MEM_BASE + DDB_PCI_MEM_SIZE - 1,
IORESOURCE_MEM
.start = DDB_PCI_MEM_BASE + 0x00100000, /* leave 1 MB for RTC */
.end = DDB_PCI_MEM_BASE + DDB_PCI_MEM_SIZE - 1,
.name = "pci memory space",
.flags = IORESOURCE_MEM
};
extern struct pci_ops ddb5476_ext_pci_ops;

View File

@@ -22,31 +22,31 @@
#include <asm/ddb5xxx/ddb5xxx.h>
static struct resource extpci_io_resource = {
"ext pci IO space",
DDB_PCI0_IO_BASE - DDB_PCI_IO_BASE + 0x4000,
DDB_PCI0_IO_BASE - DDB_PCI_IO_BASE + DDB_PCI0_IO_SIZE - 1,
IORESOURCE_IO
.start = DDB_PCI0_IO_BASE - DDB_PCI_IO_BASE + 0x4000,
.end = DDB_PCI0_IO_BASE - DDB_PCI_IO_BASE + DDB_PCI0_IO_SIZE - 1,
.name = "ext pci IO space",
.flags = IORESOURCE_IO
};
static struct resource extpci_mem_resource = {
"ext pci memory space",
DDB_PCI0_MEM_BASE + 0x100000,
DDB_PCI0_MEM_BASE + DDB_PCI0_MEM_SIZE - 1,
IORESOURCE_MEM
.start = DDB_PCI0_MEM_BASE + 0x100000,
.end = DDB_PCI0_MEM_BASE + DDB_PCI0_MEM_SIZE - 1,
.name = "ext pci memory space",
.flags = IORESOURCE_MEM
};
static struct resource iopci_io_resource = {
"io pci IO space",
DDB_PCI1_IO_BASE - DDB_PCI_IO_BASE,
DDB_PCI1_IO_BASE - DDB_PCI_IO_BASE + DDB_PCI1_IO_SIZE - 1,
IORESOURCE_IO
.start = DDB_PCI1_IO_BASE - DDB_PCI_IO_BASE,
.end = DDB_PCI1_IO_BASE - DDB_PCI_IO_BASE + DDB_PCI1_IO_SIZE - 1,
.name = "io pci IO space",
.flags = IORESOURCE_IO
};
static struct resource iopci_mem_resource = {
"ext pci memory space",
DDB_PCI1_MEM_BASE,
DDB_PCI1_MEM_BASE + DDB_PCI1_MEM_SIZE - 1,
IORESOURCE_MEM
.start = DDB_PCI1_MEM_BASE,
.end = DDB_PCI1_MEM_BASE + DDB_PCI1_MEM_SIZE - 1,
.name = "ext pci memory space",
.flags = IORESOURCE_MEM
};
extern struct pci_ops ddb5477_ext_pci_ops;

View File

@@ -35,17 +35,17 @@
#include <asm/debug.h>
struct resource pci_io_resource = {
"IO MEM",
0x1000, /* reserve regacy I/O space */
0x1000 + JMR3927_PCIIO_SIZE - 1,
IORESOURCE_IO
.name = "IO MEM",
.start = 0x1000, /* reserve regacy I/O space */
.end = 0x1000 + JMR3927_PCIIO_SIZE - 1,
.flags = IORESOURCE_IO
};
struct resource pci_mem_resource = {
"PCI MEM",
JMR3927_PCIMEM,
JMR3927_PCIMEM + JMR3927_PCIMEM_SIZE - 1,
IORESOURCE_MEM
.name = "PCI MEM",
.start = JMR3927_PCIMEM,
.end = JMR3927_PCIMEM + JMR3927_PCIMEM_SIZE - 1,
.flags = IORESOURCE_MEM
};
extern struct pci_ops jmr3927_pci_ops;

View File

@@ -71,13 +71,13 @@ static inline void pci0WriteConfigReg(unsigned int offset, unsigned int data)
}
static struct resource ocelot_mem_resource = {
iomem_resource.start = GT_PCI_MEM_BASE;
iomem_resource.end = GT_PCI_MEM_BASE + GT_PCI_MEM_BASE - 1;
start = GT_PCI_MEM_BASE;
end = GT_PCI_MEM_BASE + GT_PCI_MEM_BASE - 1;
};
static struct resource ocelot_io_resource = {
ioport_resource.start = GT_PCI_IO_BASE;
ioport_resource.end = GT_PCI_IO_BASE + GT_PCI_IO_SIZE - 1;
start = GT_PCI_IO_BASE;
end = GT_PCI_IO_BASE + GT_PCI_IO_SIZE - 1;
};
static struct pci_controller ocelot_pci_controller = {

View File

@@ -14,7 +14,10 @@
extern struct pci_ops titan_pci_ops;
static struct resource py_mem_resource = {
"Titan PCI MEM", 0xe0000000UL, 0xe3ffffffUL, IORESOURCE_MEM
.start = 0xe0000000UL,
.end = 0xe3ffffffUL,
.name = "Titan PCI MEM",
.flags = IORESOURCE_MEM
};
/*
@@ -26,7 +29,10 @@ static struct resource py_mem_resource = {
#define TITAN_IO_BASE 0xe8000000UL
static struct resource py_io_resource = {
"Titan IO MEM", 0x00001000UL, TITAN_IO_SIZE - 1, IORESOURCE_IO,
.start = 0x00001000UL,
.end = TITAN_IO_SIZE - 1,
.name = "Titan IO MEM",
.flags = IORESOURCE_IO,
};
static struct pci_controller py_controller = {