[LinuxBIOS] r519 - in LinuxBIOSv3: arch/x86 arch/x86/geodelx device include/arch/x86 include/device mainboard/artecgroup/dbe61 mainboard/emulation/qemu-x86
svn at openbios.org
svn at openbios.org
Mon Nov 26 14:28:53 CET 2007
Author: uwe
Date: 2007-11-26 14:28:52 +0100 (Mon, 26 Nov 2007)
New Revision: 519
Modified:
LinuxBIOSv3/arch/x86/geodelx/cpu.c
LinuxBIOSv3/arch/x86/pci_ops_conf1.c
LinuxBIOSv3/arch/x86/pci_ops_conf2.c
LinuxBIOSv3/arch/x86/pci_ops_mmconf.c
LinuxBIOSv3/device/agp_device.c
LinuxBIOSv3/device/cardbus_device.c
LinuxBIOSv3/device/hypertransport.c
LinuxBIOSv3/device/pcie_device.c
LinuxBIOSv3/device/pcix_device.c
LinuxBIOSv3/device/root_device.c
LinuxBIOSv3/include/arch/x86/pci_ops.h
LinuxBIOSv3/include/device/device.h
LinuxBIOSv3/mainboard/artecgroup/dbe61/initram.c
LinuxBIOSv3/mainboard/artecgroup/dbe61/stage1.c
LinuxBIOSv3/mainboard/emulation/qemu-x86/vga.c
Log:
Constify structs which can be const.
Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
Acked-by: Ronald G. Minnich <rminnich at gmail.com>
Modified: LinuxBIOSv3/arch/x86/geodelx/cpu.c
===================================================================
--- LinuxBIOSv3/arch/x86/geodelx/cpu.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/arch/x86/geodelx/cpu.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -83,7 +83,7 @@
* in multiple CPU files and use the device ID, at scan time, to pick which
* one is used. There is a lot of flexibility here!
*/
-static struct device_operations geodelx_cpuops = {
+static const struct device_operations geodelx_cpuops = {
.constructor = default_device_constructor,
.phase3_scan = NULL,
.phase6_init = lx_init,
@@ -97,7 +97,7 @@
* depending on date manufactured they can be all over the place (the Geode
* alone has had 3 vendors!) so we will have to be careful.
*/
-struct constructor geodelx_constructors[] = {
+const struct constructor geodelx_constructors[] = {
{.id = {.type = DEVICE_ID_PCI,
/* TODO: This is incorrect, these are _not_ PCI IDs! */
.u = {.pci = {.vendor = X86_VENDOR_AMD,.device = 0x05A2}}},
Modified: LinuxBIOSv3/arch/x86/pci_ops_conf1.c
===================================================================
--- LinuxBIOSv3/arch/x86/pci_ops_conf1.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/arch/x86/pci_ops_conf1.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -58,8 +58,7 @@
#undef CONFIG_CMD
-struct pci_bus_operations pci_cf8_conf1 =
-{
+const struct pci_bus_operations pci_cf8_conf1 = {
.read8 = pci_conf1_read_config8,
.read16 = pci_conf1_read_config16,
.read32 = pci_conf1_read_config32,
Modified: LinuxBIOSv3/arch/x86/pci_ops_conf2.c
===================================================================
--- LinuxBIOSv3/arch/x86/pci_ops_conf2.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/arch/x86/pci_ops_conf2.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -67,8 +67,7 @@
#undef IOADDR
#undef DEVFUNC
-struct pci_bus_operations pci_cf8_conf2 =
-{
+const struct pci_bus_operations pci_cf8_conf2 = {
.read8 = pci_conf2_read_config8,
.read16 = pci_conf2_read_config16,
.read32 = pci_conf2_read_config32,
Modified: LinuxBIOSv3/arch/x86/pci_ops_mmconf.c
===================================================================
--- LinuxBIOSv3/arch/x86/pci_ops_mmconf.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/arch/x86/pci_ops_mmconf.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -48,9 +48,7 @@
write8x(PCI_MMIO_ADDR(bus, devfn, where), value);
}
-
-const struct pci_bus_operations pci_ops_mmconf =
-{
+const struct pci_bus_operations pci_ops_mmconf = {
.read8 = pci_mmconf_read_config8,
.read16 = pci_mmconf_read_config16,
.read32 = pci_mmconf_read_config32,
Modified: LinuxBIOSv3/device/agp_device.c
===================================================================
--- LinuxBIOSv3/device/agp_device.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/device/agp_device.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -55,11 +55,11 @@
}
/** Default device operations for AGP bridges. */
-static struct pci_operations agp_bus_ops_pci = {
+static const struct pci_operations agp_bus_ops_pci = {
.set_subsystem = 0,
};
-struct device_operations default_agp_ops_bus = {
+const struct device_operations default_agp_ops_bus = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
Modified: LinuxBIOSv3/device/cardbus_device.c
===================================================================
--- LinuxBIOSv3/device/cardbus_device.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/device/cardbus_device.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -242,7 +242,7 @@
return max;
}
-struct device_operations default_cardbus_ops_bus = {
+const struct device_operations default_cardbus_ops_bus = {
.read_resources = cardbus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = cardbus_enable_resources,
Modified: LinuxBIOSv3/device/hypertransport.c
===================================================================
--- LinuxBIOSv3/device/hypertransport.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/device/hypertransport.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -629,11 +629,11 @@
}
/** Default device operations for hypertransport bridges. */
-static struct pci_operations ht_bus_ops_pci = {
+static const struct pci_operations ht_bus_ops_pci = {
.set_subsystem = 0,
};
-struct device_operations default_ht_ops_bus = {
+const struct device_operations default_ht_ops_bus = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
Modified: LinuxBIOSv3/device/pcie_device.c
===================================================================
--- LinuxBIOSv3/device/pcie_device.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/device/pcie_device.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -57,11 +57,11 @@
}
/** Default device operations for PCI Express bridges. */
-static struct pci_operations pcie_bus_ops_pci = {
+static const struct pci_operations pcie_bus_ops_pci = {
.set_subsystem = 0,
};
-struct device_operations default_pcie_ops_bus = {
+const struct device_operations default_pcie_ops_bus = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
Modified: LinuxBIOSv3/device/pcix_device.c
===================================================================
--- LinuxBIOSv3/device/pcix_device.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/device/pcix_device.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -136,11 +136,11 @@
}
/** Default device operations for PCI-X bridges. */
-static struct pci_operations pcix_bus_ops_pci = {
+static const struct pci_operations pcix_bus_ops_pci = {
.set_subsystem = 0,
};
-struct device_operations default_pcix_ops_bus = {
+const struct device_operations default_pcix_ops_bus = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
Modified: LinuxBIOSv3/device/root_device.c
===================================================================
--- LinuxBIOSv3/device/root_device.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/device/root_device.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -216,7 +216,7 @@
* own ops in (e.g.) the mainboard, and initialize it in the dts in the
* mainboard directory.
*/
-struct device_operations default_dev_ops_root = {
+const struct device_operations default_dev_ops_root = {
.phase4_read_resources = root_dev_read_resources,
.phase4_set_resources = root_dev_set_resources,
.phase5_enable_resources = root_dev_enable_resources,
Modified: LinuxBIOSv3/include/arch/x86/pci_ops.h
===================================================================
--- LinuxBIOSv3/include/arch/x86/pci_ops.h 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/include/arch/x86/pci_ops.h 2007-11-26 13:28:52 UTC (rev 519)
@@ -17,11 +17,11 @@
#ifndef ARCH_X86_PCI_OPS_H
#define ARCH_X86_PCI_OPS_H
-extern struct pci_bus_operations pci_cf8_conf1;
-extern struct pci_bus_operations pci_cf8_conf2;
+extern const struct pci_bus_operations pci_cf8_conf1;
+extern const struct pci_bus_operations pci_cf8_conf2;
#if defined(CONFIG_MMCONF_SUPPORT) && (CONFIG_MMCONF_SUPPORT==1)
-extern struct pci_bus_operations pci_ops_mmconf;
+extern const struct pci_bus_operations pci_ops_mmconf;
#endif
void pci_set_method(struct device * dev);
Modified: LinuxBIOSv3/include/device/device.h
===================================================================
--- LinuxBIOSv3/include/device/device.h 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/include/device/device.h 2007-11-26 13:28:52 UTC (rev 519)
@@ -270,7 +270,7 @@
resource_t align_up(resource_t val, unsigned long gran);
resource_t align_down(resource_t val, unsigned long gran);
-extern struct device_operations default_dev_ops_root;
+extern const struct device_operations default_dev_ops_root;
extern int id_eq(struct device_id *id1, struct device_id *id2);
void root_dev_read_resources(struct device * dev);
Modified: LinuxBIOSv3/mainboard/artecgroup/dbe61/initram.c
===================================================================
--- LinuxBIOSv3/mainboard/artecgroup/dbe61/initram.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/mainboard/artecgroup/dbe61/initram.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -107,7 +107,7 @@
/* Hold Count - how long we will sit in reset */
#define PLLMSRlo 0x00DE0000
-struct wmsr {
+static const struct wmsr {
u32 reg;
struct msr msr;
} dbe61_msr[] = {
Modified: LinuxBIOSv3/mainboard/artecgroup/dbe61/stage1.c
===================================================================
--- LinuxBIOSv3/mainboard/artecgroup/dbe61/stage1.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/mainboard/artecgroup/dbe61/stage1.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -30,7 +30,7 @@
#include <southbridge/amd/cs5536/cs5536.h>
#include <northbridge/amd/geodelx/raminit.h>
-struct wmsr {
+static const struct wmsr {
u32 reg;
struct msr msr;
} dbe61_msr[] = {
Modified: LinuxBIOSv3/mainboard/emulation/qemu-x86/vga.c
===================================================================
--- LinuxBIOSv3/mainboard/emulation/qemu-x86/vga.c 2007-11-24 22:17:26 UTC (rev 518)
+++ LinuxBIOSv3/mainboard/emulation/qemu-x86/vga.c 2007-11-26 13:28:52 UTC (rev 519)
@@ -40,7 +40,7 @@
init_pc_keyboard(0x60, 0x64, &conf);
}
-static struct device_operations qemuvga_pci_ops_dev = {
+static const struct device_operations qemuvga_pci_ops_dev = {
.constructor = default_device_constructor,
.phase3_scan = 0,
.phase4_read_resources = pci_dev_read_resources,
@@ -51,7 +51,7 @@
.ops_pci = &pci_dev_ops_pci,
};
-struct constructor qemuvga_constructors[] = {
+const struct constructor qemuvga_constructors[] = {
{.id = {.type = DEVICE_ID_PCI,
.u = {.pci = {.vendor = PCI_VENDOR_ID_CIRRUS,
.device = PCI_DEVICE_ID_CIRRUS_5446}}},
More information about the coreboot
mailing list