mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 10:01:32 +00:00
dm: pch: Remove pch_get_version op
pch_get_version op was only used by the ich spi controller driver, and does not really provide a good identification of pch controller so far, since we see plenty of Intel PCH chipsets and one differs from another a lot, which is not simply either a PCHV_7 or PCHV_9. Now that ich spi controller driver was updated to not get such info from pch, the pch_get_version op is useless now. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
254e677925
commit
d02be99e67
5 changed files with 0 additions and 48 deletions
|
@ -182,11 +182,6 @@ static int bd82x6x_pch_get_sbase(struct udevice *dev, ulong *sbasep)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum pch_version bd82x6x_pch_get_version(struct udevice *dev)
|
|
||||||
{
|
|
||||||
return PCHV_9;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int bd82x6x_set_spi_protect(struct udevice *dev, bool protect)
|
static int bd82x6x_set_spi_protect(struct udevice *dev, bool protect)
|
||||||
{
|
{
|
||||||
uint8_t bios_cntl;
|
uint8_t bios_cntl;
|
||||||
|
@ -207,7 +202,6 @@ static int bd82x6x_set_spi_protect(struct udevice *dev, bool protect)
|
||||||
|
|
||||||
static const struct pch_ops bd82x6x_pch_ops = {
|
static const struct pch_ops bd82x6x_pch_ops = {
|
||||||
.get_sbase = bd82x6x_pch_get_sbase,
|
.get_sbase = bd82x6x_pch_get_sbase,
|
||||||
.get_version = bd82x6x_pch_get_version,
|
|
||||||
.set_spi_protect = bd82x6x_set_spi_protect,
|
.set_spi_protect = bd82x6x_set_spi_protect,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,16 +23,6 @@ int pch_get_sbase(struct udevice *dev, ulong *sbasep)
|
||||||
return ops->get_sbase(dev, sbasep);
|
return ops->get_sbase(dev, sbasep);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum pch_version pch_get_version(struct udevice *dev)
|
|
||||||
{
|
|
||||||
struct pch_ops *ops = pch_get_ops(dev);
|
|
||||||
|
|
||||||
if (!ops->get_version)
|
|
||||||
return -ENOSYS;
|
|
||||||
|
|
||||||
return ops->get_version(dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
int pch_set_spi_protect(struct udevice *dev, bool protect)
|
int pch_set_spi_protect(struct udevice *dev, bool protect)
|
||||||
{
|
{
|
||||||
struct pch_ops *ops = pch_get_ops(dev);
|
struct pch_ops *ops = pch_get_ops(dev);
|
||||||
|
|
|
@ -22,11 +22,6 @@ static int pch7_get_sbase(struct udevice *dev, ulong *sbasep)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum pch_version pch7_get_version(struct udevice *dev)
|
|
||||||
{
|
|
||||||
return PCHV_7;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int pch7_set_spi_protect(struct udevice *dev, bool protect)
|
static int pch7_set_spi_protect(struct udevice *dev, bool protect)
|
||||||
{
|
{
|
||||||
uint8_t bios_cntl;
|
uint8_t bios_cntl;
|
||||||
|
@ -44,7 +39,6 @@ static int pch7_set_spi_protect(struct udevice *dev, bool protect)
|
||||||
|
|
||||||
static const struct pch_ops pch7_ops = {
|
static const struct pch_ops pch7_ops = {
|
||||||
.get_sbase = pch7_get_sbase,
|
.get_sbase = pch7_get_sbase,
|
||||||
.get_version = pch7_get_version,
|
|
||||||
.set_spi_protect = pch7_set_spi_protect,
|
.set_spi_protect = pch7_set_spi_protect,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,8 @@ static int pch9_get_sbase(struct udevice *dev, ulong *sbasep)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum pch_version pch9_get_version(struct udevice *dev)
|
|
||||||
{
|
|
||||||
return PCHV_9;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct pch_ops pch9_ops = {
|
static const struct pch_ops pch9_ops = {
|
||||||
.get_sbase = pch9_get_sbase,
|
.get_sbase = pch9_get_sbase,
|
||||||
.get_version = pch9_get_version,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct udevice_id pch9_ids[] = {
|
static const struct udevice_id pch9_ids[] = {
|
||||||
|
|
|
@ -8,12 +8,6 @@
|
||||||
#ifndef __pch_h
|
#ifndef __pch_h
|
||||||
#define __pch_h
|
#define __pch_h
|
||||||
|
|
||||||
enum pch_version {
|
|
||||||
PCHV_UNKNOWN,
|
|
||||||
PCHV_7,
|
|
||||||
PCHV_9,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define PCH_RCBA 0xf0
|
#define PCH_RCBA 0xf0
|
||||||
|
|
||||||
#define BIOS_CTRL_BIOSWE BIT(0)
|
#define BIOS_CTRL_BIOSWE BIT(0)
|
||||||
|
@ -29,13 +23,6 @@ struct pch_ops {
|
||||||
*/
|
*/
|
||||||
int (*get_sbase)(struct udevice *dev, ulong *sbasep);
|
int (*get_sbase)(struct udevice *dev, ulong *sbasep);
|
||||||
|
|
||||||
/**
|
|
||||||
* get_version() - get the PCH version
|
|
||||||
*
|
|
||||||
* @return version, or -ENOSYS if unknown
|
|
||||||
*/
|
|
||||||
enum pch_version (*get_version)(struct udevice *dev);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set_spi_protect() - set whether SPI flash is protected or not
|
* set_spi_protect() - set whether SPI flash is protected or not
|
||||||
*
|
*
|
||||||
|
@ -58,13 +45,6 @@ struct pch_ops {
|
||||||
*/
|
*/
|
||||||
int pch_get_sbase(struct udevice *dev, ulong *sbasep);
|
int pch_get_sbase(struct udevice *dev, ulong *sbasep);
|
||||||
|
|
||||||
/**
|
|
||||||
* pch_get_version() - get the PCH version
|
|
||||||
*
|
|
||||||
* @return version, or -ENOSYS if unknown
|
|
||||||
*/
|
|
||||||
enum pch_version pch_get_version(struct udevice *dev);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set_spi_protect() - set whether SPI flash is protected or not
|
* set_spi_protect() - set whether SPI flash is protected or not
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue