soc/intel/baytrail: Simplify pattrs definitions

This reduces the differences between Bay Trail and Braswell.

Tested with BUILD_TIMELESS=1, Google Ninja remains identical.

Change-Id: I90632909cd7d632d80739b3762e4ccba51624b75
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43200
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Angel Pons 2020-07-07 18:21:27 +02:00
parent c5bcd28554
commit baebe2afc1
2 changed files with 4 additions and 8 deletions

View File

@ -37,13 +37,10 @@ struct pattrs {
* This is just to hide the abstraction w/o relying on how the underlying * This is just to hide the abstraction w/o relying on how the underlying
* storage is allocated. * storage is allocated.
*/ */
#define PATTRS_GLOB_NAME __global_pattrs extern struct pattrs __global_pattrs;
#define DEFINE_PATTRS struct pattrs PATTRS_GLOB_NAME
extern DEFINE_PATTRS;
static inline const struct pattrs *pattrs_get(void) static inline const struct pattrs *pattrs_get(void)
{ {
return &PATTRS_GLOB_NAME; return &__global_pattrs;
} }
#endif /* _PATTRS_H_ */ #endif /* _PATTRS_H_ */

View File

@ -22,11 +22,10 @@
#include <soc/ramstage.h> #include <soc/ramstage.h>
#include <soc/iosf.h> #include <soc/iosf.h>
/* Global PATTRS */
DEFINE_PATTRS;
#define SHOW_PATTRS 1 #define SHOW_PATTRS 1
struct pattrs __global_pattrs;
static void detect_num_cpus(struct pattrs *attrs) static void detect_num_cpus(struct pattrs *attrs)
{ {
int ecx = 0; int ecx = 0;