projects
/
librecmc
/
librecmc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e0e945
)
ramips: rt288x pci code cleanup
author
Gabor Juhos
<juhosg@openwrt.org>
Mon, 5 Oct 2009 18:44:13 +0000
(18:44 +0000)
committer
Gabor Juhos
<juhosg@openwrt.org>
Mon, 5 Oct 2009 18:44:13 +0000
(18:44 +0000)
SVN-Revision: 17916
target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
patch
|
blob
|
history
diff --git
a/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
b/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
index dc4aa4837f936f07230f541b589783dfabe26f1c..08f62871fa490064842d9ed784a6b0b56a54a7b8 100644
(file)
--- a/
target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
+++ b/
target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
@@
-42,8
+42,8
@@
static int config_access(unsigned char access_type, struct pci_bus *bus,
return 0;
}
return 0;
}
-
int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where
,
- int size, u32 *val)
+
static int rt2880_pci_config_read(struct pci_bus *bus, unsigned int devfn
,
+
int where,
int size, u32 *val)
{
u32 data = 0;
{
u32 data = 0;
@@
-60,8
+60,8
@@
int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where,
return PCIBIOS_SUCCESSFUL;
}
return PCIBIOS_SUCCESSFUL;
}
-
int
pci_config_write(struct pci_bus *bus, unsigned int devfn,
- int where, int size, u32 val)
+
static int rt2880_
pci_config_write(struct pci_bus *bus, unsigned int devfn,
+
int where, int size, u32 val)
{
u32 data = 0;
{
u32 data = 0;
@@
-84,31
+84,29
@@
int pci_config_write(struct pci_bus *bus, unsigned int devfn,
return PCIBIOS_SUCCESSFUL;
}
return PCIBIOS_SUCCESSFUL;
}
-struct pci_ops rt2880_pci_ops = {
- .read = pci_config_read,
- .write = pci_config_write,
+st
atic st
ruct pci_ops rt2880_pci_ops = {
+ .read =
rt2880_
pci_config_read,
+ .write =
rt2880_
pci_config_write,
};
};
-static struct resource pci_io_resource = {
- .name = "
pci
MEM space",
+static struct resource
rt2880_
pci_io_resource = {
+ .name = "
PCI
MEM space",
.start = 0x20000000,
.end = 0x2FFFFFFF,
.flags = IORESOURCE_MEM,
};
.start = 0x20000000,
.end = 0x2FFFFFFF,
.flags = IORESOURCE_MEM,
};
-static struct resource pci_mem_resource = {
- .name = "
pci
IO space",
+static struct resource
rt2880_
pci_mem_resource = {
+ .name = "
PCI
IO space",
.start = 0x00460000,
.end = 0x0046FFFF,
.flags = IORESOURCE_IO,
};
.start = 0x00460000,
.end = 0x0046FFFF,
.flags = IORESOURCE_IO,
};
-st
ruct pci_controller rt2880
_controller = {
+st
atic struct pci_controller rt2880_pci
_controller = {
.pci_ops = &rt2880_pci_ops,
.pci_ops = &rt2880_pci_ops,
- .mem_resource = &pci_io_resource,
- .io_resource = &pci_mem_resource,
- .mem_offset = 0x00000000UL,
- .io_offset = 0x00000000UL,
+ .mem_resource = &rt2880_pci_io_resource,
+ .io_resource = &rt2880_pci_mem_resource,
};
void inline read_config(unsigned long bus, unsigned long dev,
};
void inline read_config(unsigned long bus, unsigned long dev,
@@
-171,7
+169,7
@@
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
return irq;
}
return irq;
}
-
int init_rt2880pci
(void)
+
static int __init rt2880_pci_init
(void)
{
unsigned long val = 0;
int i;
{
unsigned long val = 0;
int i;
@@
-191,7
+189,7
@@
int init_rt2880pci(void)
write_config(0, 0, 0, PCI_BASE_ADDRESS_0, 0x08000000);
read_config(0, 0, 0, PCI_BASE_ADDRESS_0, &val);
write_config(0, 0, 0, PCI_BASE_ADDRESS_0, 0x08000000);
read_config(0, 0, 0, PCI_BASE_ADDRESS_0, &val);
- register_pci_controller(&rt2880_controller);
+ register_pci_controller(&rt2880_
pci_
controller);
return 0;
}
return 0;
}
@@
-204,4
+202,4
@@
struct pci_fixup pcibios_fixups[] = {
{0}
};
{0}
};
-arch_initcall(
init_rt2880pci
);
+arch_initcall(
rt2880_pci_init
);