Remove few more warnings and some dead code.
authorMyles Watson <mylesgw@gmail.com>
Wed, 14 Apr 2010 16:50:16 +0000 (16:50 +0000)
committerMyles Watson <mylesgw@gmail.com>
Wed, 14 Apr 2010 16:50:16 +0000 (16:50 +0000)
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5432 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

19 files changed:
src/arch/i386/include/arch/acpi.h
src/mainboard/amd/dbm690t/acpi_tables.c
src/mainboard/amd/mahogany/acpi_tables.c
src/mainboard/amd/mahogany_fam10/acpi_tables.c
src/mainboard/amd/pistachio/acpi_tables.c
src/mainboard/amd/serengeti_cheetah/acpi_tables.c
src/mainboard/amd/serengeti_cheetah_fam10/acpi_tables.c
src/mainboard/asrock/939a785gmh/acpi_tables.c
src/mainboard/intel/eagleheights/acpi_tables.c
src/mainboard/iwill/dk8_htx/acpi_tables.c
src/mainboard/kontron/kt690/acpi_tables.c
src/mainboard/technexion/tim5690/acpi_tables.c
src/mainboard/technexion/tim8690/acpi_tables.c
src/mainboard/via/epia-m/acpi_tables.c
src/mainboard/via/epia-m700/wakeup.c
src/northbridge/amd/amdfam10/amdfam10_acpi.c
src/northbridge/amd/amdk8/amdk8_acpi.c
src/northbridge/via/vx800/examples/romstage.c
src/southbridge/via/vt8237r/vt8237r_early_smbus.c

index c8f9b002171b0ef6027a428a9c129e1213396144..ebab54ca42756d58fcabdf7043eea148fe150927 100644 (file)
@@ -365,6 +365,9 @@ unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_ta
 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);
 
+void update_ssdt(void* ssdt);
+void update_ssdtx(void* ssdtx, int i);
+
 /* These can be used by the target port */
 u8 acpi_checksum(u8 *table, u32 length);
 
index 041f88069599328043cf5090ee3bdb8da4706848..9c6a9ea4984cf4e783c655895fc5206e96534f1c 100644 (file)
@@ -92,28 +92,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-static void update_ssdtx(void *ssdtx, int i)
-{
-       uint8_t *PCI;
-       uint8_t *HCIN;
-       uint8_t *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if (i < 7) {
-               *PCI = (uint8_t) ('4' + i - 1);
-       } else {
-               *PCI = (uint8_t) ('A' + i - 1 - 6);
-       }
-       *HCIN = (uint8_t) i;
-       *UID = (uint8_t) (i + 3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
 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);
index 429a029761a2a285c133b9b29cc82351317ba370..c4319266cb151c8b16b3a8948795903fba6def02 100644 (file)
@@ -99,32 +99,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-
-#if CONFIG_ACPI_SSDTX_NUM >= 1
-static void update_ssdtx(void *ssdtx, int i)
-{
-       u8 *PCI;
-       u8 *HCIN;
-       u8 *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if (i < 7) {
-               *PCI = (u8) ('4' + i - 1);
-       } else {
-               *PCI = (u8) ('A' + i - 1 - 6);
-       }
-       *HCIN = (u8) i;
-       *UID = (u8) (i + 3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-#endif
-
 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);
index b9d58ce836d0ba1dc5f0a0cd78f402ac4b34bc35..2e09a2395df1ea883f2c763ec9b92a9daebd78b7 100644 (file)
@@ -89,34 +89,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-extern void update_ssdt(void *ssdt);
-
-/* not tested yet. */
-#if CONFIG_ACPI_SSDTX_NUM >= 1
-static void update_ssdtx(void *ssdtx, int i)
-{
-       u8 *PCI;
-       u8 *HCIN;
-       u8 *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if (i < 7) {
-               *PCI = (u8) ('4' + i - 1);
-       } else {
-               *PCI = (u8) ('A' + i - 1 - 6);
-       }
-       *HCIN = (u8) i;
-       *UID = (u8) (i + 3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-#endif
-
 unsigned long write_acpi_tables(unsigned long start)
 {
        unsigned long current;
index 030a7fa55c4c474c3c218bada1adca5148195cc7..bf8d6542cba39875ac4642949af292de08139ab4 100644 (file)
@@ -92,30 +92,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-
-static void update_ssdtx(void *ssdtx, int i)
-{
-       uint8_t *PCI;
-       uint8_t *HCIN;
-       uint8_t *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if (i < 7) {
-               *PCI = (uint8_t) ('4' + i - 1);
-       } else {
-               *PCI = (uint8_t) ('A' + i - 1 - 6);
-       }
-       *HCIN = (uint8_t) i;
-       *UID = (uint8_t) (i + 3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
 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);
index e225aee99140161c107b93c9f8b181245568df04..d2834584eb848b427ca2628fc610b3d099ba7433 100644 (file)
@@ -150,31 +150,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-
-static void update_ssdtx(void *ssdtx, int i)
-{
-       u8 *PCI;
-       u8 *HCIN;
-       u8 *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if(i<7) {
-               *PCI  = (u8) ('4' + i - 1);
-       }
-       else {
-               *PCI  = (u8) ('A' + i - 1 - 6);
-       }
-       *HCIN = (u8) i;
-       *UID  = (u8) (i+3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
 unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
        k8acpi_write_vars();
        return (unsigned long) (acpigen_get_current());
index 6282ef60c906009dfac076f6db94c0d566bea1f6..868649171d546a130ea61c8588aba46aefb1c475 100644 (file)
@@ -160,32 +160,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-extern void update_ssdt(void *ssdt);
-
-static void update_ssdtx(void *ssdtx, int i)
-{
-       u8 *PCI;
-       u8 *HCIN;
-       u8 *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if(i<7) {
-               *PCI  = (u8) ('4' + i - 1);
-       }
-       else {
-               *PCI  = (u8) ('A' + i - 1 - 6);
-       }
-       *HCIN = (u8) i;
-       *UID  = (u8) (i+3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
 unsigned long write_acpi_tables(unsigned long start)
 {
        unsigned long current;
index 429a029761a2a285c133b9b29cc82351317ba370..c4319266cb151c8b16b3a8948795903fba6def02 100644 (file)
@@ -99,32 +99,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-
-#if CONFIG_ACPI_SSDTX_NUM >= 1
-static void update_ssdtx(void *ssdtx, int i)
-{
-       u8 *PCI;
-       u8 *HCIN;
-       u8 *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if (i < 7) {
-               *PCI = (u8) ('4' + i - 1);
-       } else {
-               *PCI = (u8) ('A' + i - 1 - 6);
-       }
-       *HCIN = (u8) i;
-       *UID = (u8) (i + 3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-#endif
-
 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);
index b4b12b1cbb0441578abb9d2e1f0aa07fd457ce99..83ed984670b1399c2245432b9b79fcb64177b30c 100644 (file)
@@ -50,7 +50,7 @@ unsigned long acpi_fill_mcfg(unsigned long current)
        return current;
 }
 
-void acpi_create_intel_hpet(acpi_hpet_t * hpet)
+static void acpi_create_intel_hpet(acpi_hpet_t * hpet)
 {
 #define HPET_ADDR  0xfed00000ULL
        acpi_header_t *header = &(hpet->header);
index 8862444453deacaf7ae06e54620cd359bc07e993..05664e31a563f449790f6562daf3eb4a825633d4 100644 (file)
@@ -157,31 +157,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-
-static void update_ssdtx(void *ssdtx, int i)
-{
-        uint8_t *PCI;
-        uint8_t *HCIN;
-        uint8_t *UID;
-
-        PCI = ssdtx + 0x32;
-        HCIN = ssdtx + 0x39;
-        UID = ssdtx + 0x40;
-
-        if(i<7) {
-                *PCI  = (uint8_t) ('4' + i - 1);
-        }
-        else {
-                *PCI  = (uint8_t) ('A' + i - 1 - 6);
-        }
-        *HCIN = (uint8_t) i;
-        *UID  = (uint8_t) (i+3);
-
-        /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
 unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
        k8acpi_write_vars();
        return (unsigned long) (acpigen_get_current());
index 5ecb613b7bc270f572682f9bd84ff2decd0c3eee..4866c18326f9c6a8ba221f216be4ed280a8c8ebb 100644 (file)
@@ -92,30 +92,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-
-static void update_ssdtx(void *ssdtx, int i)
-{
-       uint8_t *PCI;
-       uint8_t *HCIN;
-       uint8_t *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if (i < 7) {
-               *PCI = (uint8_t) ('4' + i - 1);
-       } else {
-               *PCI = (uint8_t) ('A' + i - 1 - 6);
-       }
-       *HCIN = (uint8_t) i;
-       *UID = (uint8_t) (i + 3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
 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);
index 5ecb613b7bc270f572682f9bd84ff2decd0c3eee..4866c18326f9c6a8ba221f216be4ed280a8c8ebb 100644 (file)
@@ -92,30 +92,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-
-static void update_ssdtx(void *ssdtx, int i)
-{
-       uint8_t *PCI;
-       uint8_t *HCIN;
-       uint8_t *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if (i < 7) {
-               *PCI = (uint8_t) ('4' + i - 1);
-       } else {
-               *PCI = (uint8_t) ('A' + i - 1 - 6);
-       }
-       *HCIN = (uint8_t) i;
-       *UID = (uint8_t) (i + 3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
 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);
index 5ecb613b7bc270f572682f9bd84ff2decd0c3eee..4866c18326f9c6a8ba221f216be4ed280a8c8ebb 100644 (file)
@@ -92,30 +92,6 @@ unsigned long acpi_fill_madt(unsigned long current)
        return current;
 }
 
-
-
-static void update_ssdtx(void *ssdtx, int i)
-{
-       uint8_t *PCI;
-       uint8_t *HCIN;
-       uint8_t *UID;
-
-       PCI = ssdtx + 0x32;
-       HCIN = ssdtx + 0x39;
-       UID = ssdtx + 0x40;
-
-       if (i < 7) {
-               *PCI = (uint8_t) ('4' + i - 1);
-       } else {
-               *PCI = (uint8_t) ('A' + i - 1 - 6);
-       }
-       *HCIN = (uint8_t) i;
-       *UID = (uint8_t) (i + 3);
-
-       /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
 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);
index 4d51eb66357096d0a6cad045abcbe9711def23ad..69c526c1fe20e4b34a37526c9d4c4b68c64dffab 100644 (file)
@@ -42,8 +42,6 @@ unsigned long write_acpi_tables(unsigned long start)
        unsigned long current;
        acpi_rsdp_t *rsdp;
        acpi_rsdt_t *rsdt;
-       acpi_hpet_t *hpet;
-       acpi_madt_t *madt;
        acpi_fadt_t *fadt;
        acpi_facs_t *facs;
        acpi_header_t *dsdt;
index 16277b5faaba4c1fb898672eeb4625402f959e7d..bb232b4dfe2266a379f5491e1b3e62cd4660f701 100644 (file)
@@ -133,12 +133,12 @@ void acpi_jump_wake(u32 vector)
        //jason_tsc_count_end();
 
        unsigned long long *real_mode_gdt_entries_at_eseg;
-       real_mode_gdt_entries_at_eseg = WAKE_THUNK16_GDT;               /* Copy from real_mode_gdt_entries and change limition to 1M and data base to 0; */
+       real_mode_gdt_entries_at_eseg = (void *)WAKE_THUNK16_GDT;       /* Copy from real_mode_gdt_entries and change limition to 1M and data base to 0; */
        real_mode_gdt_entries_at_eseg[0] = 0x0000000000000000ULL;       /* Null descriptor */
        real_mode_gdt_entries_at_eseg[1] = 0x000f9a000000ffffULL;       /* 16-bit real-mode 1M code at 0x00000000 */
        real_mode_gdt_entries_at_eseg[2] = 0x000f93000000ffffULL;       /* 16-bit real-mode 1M data at 0x00000000 */
 
-       wake_thunk16_Xgt_desc = WAKE_THUNK16_XDTR;
+       wake_thunk16_Xgt_desc = (void *)WAKE_THUNK16_XDTR;
        wake_thunk16_Xgt_desc[0].size = sizeof(real_mode_gdt_entries) - 1;
        wake_thunk16_Xgt_desc[0].address = (long)real_mode_gdt_entries_at_eseg;
        wake_thunk16_Xgt_desc[1].size = 0x3ff;
@@ -156,7 +156,7 @@ void acpi_jump_wake(u32 vector)
 
        unsigned char *dest, *src;
        src = (unsigned char *)dwEip;
-       dest = WAKE_RECOVER1M_CODE;
+       dest = (void *)WAKE_RECOVER1M_CODE;
        u32 i;
        for (i = 0; i < 0x200; i++)
                dest[i] = src[i];
index ba4c36bee41f9d74b4773edf1817777609215cf8..7e57cce0ab0629dd1256082dd01b63a76cb16ae8 100644 (file)
@@ -268,6 +268,28 @@ void update_ssdt(void *ssdt)
 
 }
 
+void update_ssdtx(void *ssdtx, int i)
+{
+       u8 *PCI;
+       u8 *HCIN;
+       u8 *UID;
+
+       PCI = ssdtx + 0x32;
+       HCIN = ssdtx + 0x39;
+       UID = ssdtx + 0x40;
+
+       if (i < 7) {
+               *PCI = (u8) ('4' + i - 1);
+       } else {
+               *PCI = (u8) ('A' + i - 1 - 6);
+       }
+       *HCIN = (u8) i;
+       *UID = (u8) (i + 3);
+
+       /* FIXME: need to update the GSI id in the ssdtx too */
+
+}
+
 static void update_sspr(void *sspr, u32 nodeid, u32 cpuindex)
 {
        u8 *CPU;
@@ -291,7 +313,7 @@ static void update_sspr(void *sspr, u32 nodeid, u32 cpuindex)
        CONTROL = sspr + 0x8d;
        STATUS = sspr + 0x8f;
 
-       sprintf(CPU, "%02x", (char)cpuindex);
+       sprintf((char*)CPU, "%02x", (char)cpuindex);
        *CPUIN = (u8) cpuindex;
 
        for(i=0;i<sysconf.p_state_num;i++) {
index 1257f8663365b720e7d3529632bde5a7e4429027..92a4520eac86428ff122dd20c78b9db266d4c0a0 100644 (file)
@@ -291,3 +291,26 @@ int k8acpi_write_vars(void)
        acpigen_patch_len(lens - 1);
        return lens;
 }
+
+void update_ssdtx(void *ssdtx, int i)
+{
+       u8 *PCI;
+       u8 *HCIN;
+       u8 *UID;
+
+       PCI = ssdtx + 0x32;
+       HCIN = ssdtx + 0x39;
+       UID = ssdtx + 0x40;
+
+       if (i < 7) {
+               *PCI = (u8) ('4' + i - 1);
+       } else {
+               *PCI = (u8) ('A' + i - 1 - 6);
+       }
+       *HCIN = (u8) i;
+       *UID = (u8) (i + 3);
+
+       /* FIXME: need to update the GSI id in the ssdtx too */
+
+}
+
index 9fac9a31107438dbdfce6fedc5f10b00f6aa360a..8db60237b743f45a1bd7ea7f8cd2cac5c5e6187b 100644 (file)
@@ -47,7 +47,7 @@
 #include "northbridge/via/vx800/raminit.c"
 
 
-int acpi_is_wakeup_early_via_vx800(void)
+static int acpi_is_wakeup_early_via_vx800(void)
 {
        device_t dev;
        u16 tmp, result;
index 4dd3678097fbfe799d8426e10c31d76dae9ea775..aa75f50651416c96b74842da6ebdecefca7b5237 100644 (file)
@@ -295,9 +295,10 @@ void enable_rom_decode(void)
        pci_write_config8(dev, 0x41, 0x7f);
 }
 
+#ifdef CONFIG_NORTHBRIDGE_AMD_K8 /* CN700 doesn't have the support yet */
 #define ACPI_IS_WAKEUP_EARLY 1
 
-int acpi_is_wakeup_early(void) {
+static int acpi_is_wakeup_early(void) {
        device_t dev;
        u16 tmp;
 
@@ -325,6 +326,7 @@ int acpi_is_wakeup_early(void) {
        print_debug_hex8(tmp);
        return ((tmp & (7 << 10)) >> 10) == 1 ? 3 : 0 ;
 }
+#endif
 
 #if defined(__GNUC__)
 void vt8237_early_spi_init(void)