Author: myles
Date: 2009-10-09 22:13:43 +0200 (Fri, 09 Oct 2009)
New Revision: 4756
Modified:
trunk/coreboot-v2/src/arch/i386/boot/acpi.c
trunk/coreboot-v2/src/arch/i386/boot/acpigen.c
trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h
trunk/coreboot-v2/src/arch/i386/include/arch/acpigen.h
trunk/coreboot-v2/src/cpu/amd/model_fxx/processor_name.c
trunk/coreboot-v2/src/devices/root_device.c
trunk/coreboot-v2/src/include/device/device.h
trunk/coreboot-v2/src/include/pc80/mc146818rtc.h
trunk/coreboot-v2/src/mainboard/amd/dbm690t/acpi_tables.c
trunk/coreboot-v2/src/mainboard/amd/pistachio/acpi_tables.c
trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
trunk/coreboot-v2/src/mainboard/asus/m2v-mx_se/acpi_tables.c
trunk/coreboot-v2/src/mainboard/gigabyte/m57sli/acpi_tables.c
trunk/coreboot-v2/src/mainboard/iwill/dk8_htx/acpi_tables.c
trunk/coreboot-v2/src/mainboard/kontron/986lcd-m/acpi_tables.c
trunk/coreboot-v2/src/mainboard/technexion/tim8690/acpi_tables.c
trunk/coreboot-v2/src/mainboard/tyan/s2891/acpi_tables.c
trunk/coreboot-v2/src/mainboard/tyan/s2892/acpi_tables.c
trunk/coreboot-v2/src/mainboard/tyan/s2895/acpi_tables.c
trunk/coreboot-v2/src/northbridge/amd/amdk8/amdk8_acpi.c
trunk/coreboot-v2/src/pc80/mc146818rtc.c
Log:
Add const to get rid of some warnings when passing quoted strings.
Remove an unused extern declaration.
Signed-off-by: Myles Watson <mylesgw(a)gmail.com>
Acked-by: Ronald G. Minnich <rminnich(a)gmail.com>
Modified: trunk/coreboot-v2/src/arch/i386/boot/acpi.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/acpi.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/arch/i386/boot/acpi.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -224,11 +224,11 @@
/* this can be overriden by platform ACPI setup code,
if it calls acpi_create_ssdt_generator */
unsigned long __attribute__((weak)) acpi_fill_ssdt_generator(unsigned long current,
- char *oem_table_id) {
+ const char *oem_table_id) {
return current;
}
-void acpi_create_ssdt_generator(acpi_header_t *ssdt, char *oem_table_id)
+void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id)
{
unsigned long current=(unsigned long)ssdt+sizeof(acpi_header_t);
memset((void *)ssdt, 0, sizeof(acpi_header_t));
Modified: trunk/coreboot-v2/src/arch/i386/boot/acpigen.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/acpigen.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/arch/i386/boot/acpigen.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -114,7 +114,7 @@
return 9;
}
-int acpigen_write_name_byte(char *name, uint8_t val)
+int acpigen_write_name_byte(const char *name, uint8_t val)
{
int len;
len = acpigen_write_name(name);
@@ -122,7 +122,7 @@
return len;
}
-int acpigen_write_name_dword(char *name, uint32_t val)
+int acpigen_write_name_dword(const char *name, uint32_t val)
{
int len;
len = acpigen_write_name(name);
@@ -130,7 +130,7 @@
return len;
}
-int acpigen_write_name_qword(char *name, uint64_t val)
+int acpigen_write_name_qword(const char *name, uint64_t val)
{
int len;
len = acpigen_write_name(name);
@@ -138,7 +138,7 @@
return len;
}
-int acpigen_emit_stream(char *data, int size)
+int acpigen_emit_stream(const char *data, int size)
{
int i;
for (i = 0; i < size; i++) {
@@ -152,7 +152,7 @@
and 5.3 of ACPI specs 3.0 for details
*/
-static int acpigen_emit_simple_namestring(char *name) {
+static int acpigen_emit_simple_namestring(const char *name) {
int i, len = 0;
char ud[] = "____";
for (i = 0; i < 4; i++) {
@@ -166,7 +166,7 @@
return len;
}
-static int acpigen_emit_double_namestring(char *name, int dotpos) {
+static int acpigen_emit_double_namestring(const char *name, int dotpos) {
int len = 0;
/* mark dual name prefix */
len += acpigen_emit_byte(0x2e);
@@ -175,7 +175,7 @@
return len;
}
-static int acpigen_emit_multi_namestring(char *name) {
+static int acpigen_emit_multi_namestring(const char *name) {
int len = 0, count = 0;
unsigned char *pathlen;
/* mark multi name prefix */
@@ -199,9 +199,9 @@
}
-int acpigen_emit_namestring(char *namepath) {
+int acpigen_emit_namestring(const char *namepath) {
int dotcount = 0, i;
- int dotpos;
+ int dotpos = 0;
int len = 0;
/* we can start with a \ */
@@ -237,7 +237,7 @@
return len;
}
-int acpigen_write_name(char *name)
+int acpigen_write_name(const char *name)
{
int len;
/* name op */
@@ -245,7 +245,7 @@
return len + acpigen_emit_namestring(name);
}
-int acpigen_write_scope(char *name)
+int acpigen_write_scope(const char *name)
{
int len;
/* scope op */
Modified: trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h
===================================================================
--- trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/arch/i386/include/arch/acpi.h 2009-10-09 20:13:43 UTC (rev 4756)
@@ -336,9 +336,9 @@
unsigned long acpi_fill_mcfg(unsigned long current);
unsigned long acpi_fill_srat(unsigned long current);
unsigned long acpi_fill_slit(unsigned long current);
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id);
-void acpi_create_ssdt_generator(acpi_header_t *ssdt, char *oem_table_id);
-void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs,void *dsdt);
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id);
+void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id);
+void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs, void *dsdt);
/* These can be used by the target port */
u8 acpi_checksum(u8 *table, u32 length);
Modified: trunk/coreboot-v2/src/arch/i386/include/arch/acpigen.h
===================================================================
--- trunk/coreboot-v2/src/arch/i386/include/arch/acpigen.h 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/arch/i386/include/arch/acpigen.h 2009-10-09 20:13:43 UTC (rev 4756)
@@ -28,15 +28,15 @@
int acpigen_write_package(int nr_el);
int acpigen_write_byte(unsigned int data);
int acpigen_emit_byte(unsigned char data);
-int acpigen_emit_stream(char *data, int size);
-int acpigen_emit_namestring(char *namepath);
+int acpigen_emit_stream(const char *data, int size);
+int acpigen_emit_namestring(const char *namepath);
int acpigen_write_dword(unsigned int data);
int acpigen_write_qword(uint64_t data);
-int acpigen_write_name(char *name);
-int acpigen_write_name_dword(char *name, uint32_t val);
-int acpigen_write_name_qword(char *name, uint64_t val);
-int acpigen_write_name_byte(char *name, uint8_t val);
-int acpigen_write_scope(char *name);
+int acpigen_write_name(const char *name);
+int acpigen_write_name_dword(const char *name, uint32_t val);
+int acpigen_write_name_qword(const char *name, uint64_t val);
+int acpigen_write_name_byte(const char *name, uint8_t val);
+int acpigen_write_scope(const char *name);
int acpigen_write_PPC(u8 nr);
int acpigen_write_empty_PCT(void);
int acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat, u32 busmLat,
Modified: trunk/coreboot-v2/src/cpu/amd/model_fxx/processor_name.c
===================================================================
--- trunk/coreboot-v2/src/cpu/amd/model_fxx/processor_name.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/cpu/amd/model_fxx/processor_name.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -42,7 +42,7 @@
*/
#if CONFIG_K8_REV_F_SUPPORT == 0
-static char *processor_names[]={
+static const char *processor_names[]={
/* 0x00 */ "AMD Engineering Sample",
/* 0x01-0x03 */ NULL, NULL, NULL,
/* 0x04 */ "AMD Athlon(tm) 64 Processor XX00+",
Modified: trunk/coreboot-v2/src/devices/root_device.c
===================================================================
--- trunk/coreboot-v2/src/devices/root_device.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/devices/root_device.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -182,11 +182,3 @@
.scan_bus = root_dev_scan_bus,
.reset_bus = root_dev_reset,
};
-
-/**
- * @brief The root of device tree.
- *
- * This is the root of the device tree. The device tree is defined in the
- * static.c file and is generated by config tool during compile time.
- */
-extern struct device dev_root;
Modified: trunk/coreboot-v2/src/include/device/device.h
===================================================================
--- trunk/coreboot-v2/src/include/device/device.h 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/include/device/device.h 2009-10-09 20:13:43 UTC (rev 4756)
@@ -90,7 +90,11 @@
void *chip_info;
};
-extern struct device dev_root; /* root bus */
+/**
+ * This is the root of the device tree. The device tree is defined in the
+ * static.c file and is generated by the config tool at compile time.
+ */
+extern struct device dev_root;
extern struct device *all_devices; /* list of all devices */
Modified: trunk/coreboot-v2/src/include/pc80/mc146818rtc.h
===================================================================
--- trunk/coreboot-v2/src/include/pc80/mc146818rtc.h 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/include/pc80/mc146818rtc.h 2009-10-09 20:13:43 UTC (rev 4756)
@@ -95,9 +95,9 @@
#if !defined(ASSEMBLY)
void rtc_init(int invalid);
#if CONFIG_USE_OPTION_TABLE == 1
-int get_option(void *dest, char *name);
+int get_option(void *dest, const char *name);
#else
-static inline int get_option(void *dest, char *name) { return -2; }
+static inline int get_option(void *dest, const char *name) { return -2; }
#endif
#endif
Modified: trunk/coreboot-v2/src/mainboard/amd/dbm690t/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/amd/dbm690t/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/amd/dbm690t/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -123,7 +123,7 @@
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) {
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
return (unsigned long) (acpigen_get_current());
Modified: trunk/coreboot-v2/src/mainboard/amd/pistachio/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/amd/pistachio/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/amd/pistachio/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -123,7 +123,7 @@
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) {
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
return (unsigned long) (acpigen_get_current());
Modified: trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/amd/serengeti_cheetah/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -179,7 +179,7 @@
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) {
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
return (unsigned long) (acpigen_get_current());
}
Modified: trunk/coreboot-v2/src/mainboard/asus/m2v-mx_se/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/asus/m2v-mx_se/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/asus/m2v-mx_se/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -82,7 +82,7 @@
return current;
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id)
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id)
{
k8acpi_write_vars();
amd_model_fxx_generate_powernow(0, 0, 0);
Modified: trunk/coreboot-v2/src/mainboard/gigabyte/m57sli/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/gigabyte/m57sli/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/gigabyte/m57sli/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -93,7 +93,7 @@
return current;
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id)
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id)
{
k8acpi_write_vars();
amd_model_fxx_generate_powernow(0, 0, 0);
Modified: trunk/coreboot-v2/src/mainboard/iwill/dk8_htx/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/iwill/dk8_htx/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/iwill/dk8_htx/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -182,7 +182,7 @@
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) {
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
return (unsigned long) (acpigen_get_current());
}
Modified: trunk/coreboot-v2/src/mainboard/kontron/986lcd-m/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/kontron/986lcd-m/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/kontron/986lcd-m/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -176,7 +176,7 @@
return current;
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id)
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id)
{
generate_cpu_entries();
return (unsigned long) (acpigen_get_current());
Modified: trunk/coreboot-v2/src/mainboard/technexion/tim8690/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/technexion/tim8690/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/technexion/tim8690/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -123,7 +123,7 @@
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) {
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
return (unsigned long) (acpigen_get_current());
Modified: trunk/coreboot-v2/src/mainboard/tyan/s2891/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/tyan/s2891/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/tyan/s2891/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -75,7 +75,7 @@
return current;
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) {
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(0, 0, 0);
return (unsigned long) (acpigen_get_current());
Modified: trunk/coreboot-v2/src/mainboard/tyan/s2892/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/tyan/s2892/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/tyan/s2892/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -75,7 +75,7 @@
return current;
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) {
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(0, 0, 0);
return (unsigned long) (acpigen_get_current());
Modified: trunk/coreboot-v2/src/mainboard/tyan/s2895/acpi_tables.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/tyan/s2895/acpi_tables.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/mainboard/tyan/s2895/acpi_tables.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -86,7 +86,7 @@
return current;
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, char *oem_table_id) {
+unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(0, 0, 0);
return (unsigned long) (acpigen_get_current());
Modified: trunk/coreboot-v2/src/northbridge/amd/amdk8/amdk8_acpi.c
===================================================================
--- trunk/coreboot-v2/src/northbridge/amd/amdk8/amdk8_acpi.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/northbridge/amd/amdk8/amdk8_acpi.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -248,7 +248,7 @@
return len;
}
-static int k8acpi_write_pci_data(int dlen, char *name, int offset) {
+static int k8acpi_write_pci_data(int dlen, const char *name, int offset) {
device_t dev;
uint32_t dword;
int len, lenp, i;
Modified: trunk/coreboot-v2/src/pc80/mc146818rtc.c
===================================================================
--- trunk/coreboot-v2/src/pc80/mc146818rtc.c 2009-10-09 20:07:48 UTC (rev 4755)
+++ trunk/coreboot-v2/src/pc80/mc146818rtc.c 2009-10-09 20:13:43 UTC (rev 4756)
@@ -231,7 +231,7 @@
return 0;
}
-int get_option(void *dest, char *name)
+int get_option(void *dest, const char *name)
{
extern struct cmos_option_table option_table;
struct cmos_option_table *ct;