Spell out 'sbase' to 'spi_base' so that it looks clearer.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
return 0;
}
-static int bd82x6x_pch_get_sbase(struct udevice *dev, ulong *sbasep)
+static int bd82x6x_pch_get_spi_base(struct udevice *dev, ulong *sbasep)
{
u32 rcba;
}
static const struct pch_ops bd82x6x_pch_ops = {
- .get_sbase = bd82x6x_pch_get_sbase,
+ .get_spi_base = bd82x6x_pch_get_spi_base,
.set_spi_protect = bd82x6x_set_spi_protect,
};
DECLARE_GLOBAL_DATA_PTR;
-int pch_get_sbase(struct udevice *dev, ulong *sbasep)
+int pch_get_spi_base(struct udevice *dev, ulong *sbasep)
{
struct pch_ops *ops = pch_get_ops(dev);
*sbasep = 0;
- if (!ops->get_sbase)
+ if (!ops->get_spi_base)
return -ENOSYS;
- return ops->get_sbase(dev, sbasep);
+ return ops->get_spi_base(dev, sbasep);
}
int pch_set_spi_protect(struct udevice *dev, bool protect)
#define BIOS_CTRL 0xd8
-static int pch7_get_sbase(struct udevice *dev, ulong *sbasep)
+static int pch7_get_spi_base(struct udevice *dev, ulong *sbasep)
{
u32 rcba;
}
static const struct pch_ops pch7_ops = {
- .get_sbase = pch7_get_sbase,
+ .get_spi_base = pch7_get_spi_base,
.set_spi_protect = pch7_set_spi_protect,
};
#define SBASE_ADDR 0x54
-static int pch9_get_sbase(struct udevice *dev, ulong *sbasep)
+static int pch9_get_spi_base(struct udevice *dev, ulong *sbasep)
{
uint32_t sbase_addr;
}
static const struct pch_ops pch9_ops = {
- .get_sbase = pch9_get_sbase,
+ .get_spi_base = pch9_get_spi_base,
};
static const struct udevice_id pch9_ids[] = {
void *sbase;
/* SBASE is similar */
- pch_get_sbase(dev->parent, &sbase_addr);
+ pch_get_spi_base(dev->parent, &sbase_addr);
sbase = (void *)sbase_addr;
debug("%s: sbase=%p\n", __func__, sbase);
/* Operations for the Platform Controller Hub */
struct pch_ops {
/**
- * get_sbase() - get the address of SPI base
+ * get_spi_base() - get the address of SPI base
*
* @dev: PCH device to check
* @sbasep: Returns address of SPI base if available, else 0
* @return 0 if OK, -ve on error (e.g. there is no SPI base)
*/
- int (*get_sbase)(struct udevice *dev, ulong *sbasep);
+ int (*get_spi_base)(struct udevice *dev, ulong *sbasep);
/**
* set_spi_protect() - set whether SPI flash is protected or not
#define pch_get_ops(dev) ((struct pch_ops *)(dev)->driver->ops)
/**
- * pch_get_sbase() - get the address of SPI base
+ * pch_get_spi_base() - get the address of SPI base
*
* @dev: PCH device to check
* @sbasep: Returns address of SPI base if available, else 0
* @return 0 if OK, -ve on error (e.g. there is no SPI base)
*/
-int pch_get_sbase(struct udevice *dev, ulong *sbasep);
+int pch_get_spi_base(struct udevice *dev, ulong *sbasep);
/**
* set_spi_protect() - set whether SPI flash is protected or not