Get rid of a number of __GNUC__ checks
In the process of streamlining coreboot code and getting rid of unneeded ifdefs, drop a number of unneeded checks for the GNU C compiler. This also cleans up x86emu/types.h significantly by dropping all the duplicate types in there. Change-Id: I0bf289e149ed02e5170751c101adc335b849a410 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/3226 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
b8b3e8bff3
commit
c5e036a043
|
@ -36,54 +36,13 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* $XFree86: xc/extras/x86emu/include/x86emu/types.h,v 1.4 2000/09/26 15:56:44 tsi Exp $ */
|
||||
|
||||
#ifndef __X86EMU_TYPES_H
|
||||
#define __X86EMU_TYPES_H
|
||||
|
||||
//#ifndef IN_MODULE
|
||||
//#include <sys/types.h>
|
||||
//#endif
|
||||
|
||||
/*
|
||||
* The following kludge is an attempt to work around typedef conflicts with
|
||||
* <sys/types.h>.
|
||||
*/
|
||||
#define u8 x86emuu8
|
||||
#define u16 x86emuu16
|
||||
#define u32 x86emuu32
|
||||
#define u64 x86emuu64
|
||||
#define s8 x86emus8
|
||||
#define s16 x86emus16
|
||||
#define s32 x86emus32
|
||||
#define s64 x86emus64
|
||||
#define uint x86emuuint
|
||||
#define sint x86emusint
|
||||
|
||||
/*---------------------- Macros and type definitions ----------------------*/
|
||||
|
||||
/* Currently only for Linux/32bit */
|
||||
#if defined(__GNUC__) && !defined(NO_LONG_LONG)
|
||||
#define __HAS_LONG_LONG__
|
||||
#endif
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned int u32;
|
||||
#ifdef __HAS_LONG_LONG__
|
||||
typedef unsigned long long u64;
|
||||
#endif
|
||||
|
||||
typedef signed char s8;
|
||||
typedef signed short s16;
|
||||
typedef signed int s32;
|
||||
#ifdef __HAS_LONG_LONG__
|
||||
typedef signed long long s64;
|
||||
#endif
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef signed int sint;
|
||||
#include <stdint.h>
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef signed int sint;
|
||||
typedef u16 X86EMU_pioAddr;
|
||||
|
||||
#endif /* __X86EMU_TYPES_H */
|
||||
|
|
|
@ -33,12 +33,6 @@
|
|||
#define CPU_ID_FEATURES_MSR 0xC0011004
|
||||
#define CPU_ID_EXT_FEATURES_MSR 0xC0011005
|
||||
|
||||
//#if defined(__GNUC__)
|
||||
//// it can be used to get unitid and coreid it running only
|
||||
//struct node_core_id get_node_core_id(u32 nb_cfg_54);
|
||||
//struct node_core_id get_node_core_id_x(void);
|
||||
//#endif
|
||||
|
||||
#if defined(__PRE_RAM__)
|
||||
void wait_all_core0_started(void);
|
||||
void wait_all_other_cores_started(u32 bsp_apicid);
|
||||
|
|
|
@ -20,20 +20,16 @@
|
|||
#ifndef CPU_AMD_QUADCORE_H
|
||||
#define CPU_AMD_QUADCORE_H
|
||||
|
||||
#if defined(__GNUC__)
|
||||
u32 read_nb_cfg_54(void);
|
||||
#endif
|
||||
|
||||
struct node_core_id {
|
||||
u32 nodeid;
|
||||
u32 coreid;
|
||||
};
|
||||
|
||||
#if defined(__GNUC__)
|
||||
// it can be used to get unitid and coreid it running only
|
||||
struct node_core_id get_node_core_id(u32 nb_cfg_54);
|
||||
struct node_core_id get_node_core_id_x(void);
|
||||
#endif
|
||||
|
||||
#if !defined(__PRE_RAM__)
|
||||
struct device;
|
||||
|
|
|
@ -699,9 +699,7 @@ static int ht_setup_chains(uint8_t ht_c_num)
|
|||
|
||||
}
|
||||
|
||||
#if defined (__GNUC__)
|
||||
static inline unsigned get_nodes(void);
|
||||
#endif
|
||||
|
||||
#if CONFIG_RAMINIT_SYSINFO
|
||||
static void ht_setup_chains_x(struct sys_info *sysinfo)
|
||||
|
|
|
@ -67,8 +67,6 @@
|
|||
#define RCBA 0xF0
|
||||
#define DEFAULT_RCBA 0xFEA00000
|
||||
|
||||
#ifdef __GNUC__
|
||||
int bios_reset_detected(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,11 +28,7 @@
|
|||
#define VT8237R_SMBUS_IO_BASE 0x400
|
||||
/* 0x0 disabled, 0x2 reserved, 0xf = IRQ15 */
|
||||
#define VT8237R_ACPI_IRQ 0x9
|
||||
#if defined(__GNUC__)
|
||||
#define VT8237S_SPI_MEM_BASE 0xfed02000ULL
|
||||
#else
|
||||
#define VT8237S_SPI_MEM_BASE 0xfed02000UL
|
||||
#endif
|
||||
|
||||
/* PMBASE FIXME mostly taken from ich7 */
|
||||
#define PM1_STS 0x00
|
||||
|
@ -129,11 +125,7 @@ struct vt8237_network_rom {
|
|||
u8 cfg_c;
|
||||
u8 cfg_d;
|
||||
u8 checksum;
|
||||
}
|
||||
#if defined(__GNUC__)
|
||||
__attribute__ ((packed))
|
||||
#endif
|
||||
;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define MAINBOARD_POWER_OFF 0
|
||||
#define MAINBOARD_POWER_ON 1
|
||||
|
|
Loading…
Reference in New Issue