soc/intel/broadwell; Use boolean for pch_is_wpt_xx
Use boolean for pch_is_wpt() and pch_is_wpt_ulx(). Change-Id: Ifd1a46ebdbe08df6cc21ada100b94930b02cd7de Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83903 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: coreboot org <coreboot.org@gmail.com>
This commit is contained in:
parent
a890da52ef
commit
d4ac047c78
4 changed files with 14 additions and 9 deletions
|
|
@ -3,6 +3,8 @@
|
|||
#ifndef _BROADWELL_PCH_H_
|
||||
#define _BROADWELL_PCH_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/* Haswell ULT Pch (LynxPoint-LP) */
|
||||
#define PCH_LPT_LP_SAMPLE 0x9c41
|
||||
#define PCH_LPT_LP_PREMIUM 0x9c43
|
||||
|
|
@ -25,8 +27,8 @@
|
|||
|
||||
u8 pch_revision(void);
|
||||
u16 pch_type(void);
|
||||
int pch_is_wpt(void);
|
||||
int pch_is_wpt_ulx(void);
|
||||
bool pch_is_wpt(void);
|
||||
bool pch_is_wpt_ulx(void);
|
||||
u32 pch_read_soft_strap(int id);
|
||||
void pch_disable_devfn(struct device *dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <soc/rcba.h>
|
||||
#include <soc/intel/broadwell/pch/chip.h>
|
||||
#include <southbridge/intel/lynxpoint/iobp.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
static void adsp_init(struct device *dev)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <southbridge/intel/common/rtc.h>
|
||||
#include <southbridge/intel/lynxpoint/iobp.h>
|
||||
#include <southbridge/intel/lynxpoint/lp_gpio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
static void pch_enable_ioapic(struct device *dev)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <soc/serialio.h>
|
||||
#include <soc/spi.h>
|
||||
#include <southbridge/intel/lynxpoint/iobp.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
u8 pch_revision(void)
|
||||
{
|
||||
|
|
@ -21,14 +22,14 @@ u16 pch_type(void)
|
|||
return pci_read_config16(PCH_DEV_LPC, PCI_DEVICE_ID);
|
||||
}
|
||||
|
||||
/* Return 1 if PCH type is WildcatPoint */
|
||||
int pch_is_wpt(void)
|
||||
/* Return true if PCH type is WildcatPoint */
|
||||
bool pch_is_wpt(void)
|
||||
{
|
||||
return ((pch_type() & 0xfff0) == 0x9cc0) ? 1 : 0;
|
||||
return ((pch_type() & 0xfff0) == 0x9cc0) ? true : false;
|
||||
}
|
||||
|
||||
/* Return 1 if PCH type is WildcatPoint ULX */
|
||||
int pch_is_wpt_ulx(void)
|
||||
/* Return true if PCH type is WildcatPoint ULX */
|
||||
bool pch_is_wpt_ulx(void)
|
||||
{
|
||||
u16 lpcid = pch_type();
|
||||
|
||||
|
|
@ -36,10 +37,10 @@ int pch_is_wpt_ulx(void)
|
|||
case PCH_WPT_BDW_Y_SAMPLE:
|
||||
case PCH_WPT_BDW_Y_PREMIUM:
|
||||
case PCH_WPT_BDW_Y_BASE:
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 pch_read_soft_strap(int id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue