summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/apollolake/spi.c8
-rw-r--r--src/soc/intel/baytrail/spi.c8
-rw-r--r--src/soc/intel/braswell/spi.c8
-rw-r--r--src/soc/intel/broadwell/spi.c8
-rw-r--r--src/soc/intel/fsp_baytrail/spi.c8
-rw-r--r--src/soc/intel/fsp_broadwell_de/spi.c8
-rw-r--r--src/soc/intel/skylake/flash_controller.c8
7 files changed, 28 insertions, 28 deletions
diff --git a/src/soc/intel/apollolake/spi.c b/src/soc/intel/apollolake/spi.c
index eab3a12eac..6e873f45c8 100644
--- a/src/soc/intel/apollolake/spi.c
+++ b/src/soc/intel/apollolake/spi.c
@@ -184,8 +184,8 @@ unsigned int spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len)
return MIN(buf_len, SPIBAR_FDATA_FIFO_SIZE);
}
-int spi_xfer(struct spi_slave *slave, const void *dout,
- unsigned int bytesout, void *din, unsigned int bytesin)
+int spi_xfer(const struct spi_slave *slave, const void *dout,
+ size_t bytesout, void *din, size_t bytesin)
{
printk(BIOS_DEBUG, "NOT IMPLEMENTED: %s() !!!\n", __func__);
return E_NOT_IMPLEMENTED;
@@ -215,13 +215,13 @@ void spi_init(void)
pci_write_config32(ctx->pci_dev, SPIBAR_BIOS_CONTROL, bios_ctl);
}
-int spi_claim_bus(struct spi_slave *slave)
+int spi_claim_bus(const struct spi_slave *slave)
{
/* There's nothing we need to to here. */
return 0;
}
-void spi_release_bus(struct spi_slave *slave)
+void spi_release_bus(const struct spi_slave *slave)
{
/* No magic needed here. */
}
diff --git a/src/soc/intel/baytrail/spi.c b/src/soc/intel/baytrail/spi.c
index 1f2b285b93..13f88067eb 100644
--- a/src/soc/intel/baytrail/spi.c
+++ b/src/soc/intel/baytrail/spi.c
@@ -317,13 +317,13 @@ static void spi_init_cb(void *unused)
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, spi_init_cb, NULL);
-int spi_claim_bus(struct spi_slave *slave)
+int spi_claim_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
return 0;
}
-void spi_release_bus(struct spi_slave *slave)
+void spi_release_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
}
@@ -489,8 +489,8 @@ unsigned int spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len)
return min(cntlr.databytes, buf_len);
}
-int spi_xfer(struct spi_slave *slave, const void *dout,
- unsigned int bytesout, void *din, unsigned int bytesin)
+int spi_xfer(const struct spi_slave *slave, const void *dout,
+ size_t bytesout, void *din, size_t bytesin)
{
uint16_t control;
int16_t opcode_index;
diff --git a/src/soc/intel/braswell/spi.c b/src/soc/intel/braswell/spi.c
index 01f215008d..34e031b1cd 100644
--- a/src/soc/intel/braswell/spi.c
+++ b/src/soc/intel/braswell/spi.c
@@ -296,13 +296,13 @@ static void spi_init_cb(void *unused)
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, spi_init_cb, NULL);
-int spi_claim_bus(struct spi_slave *slave)
+int spi_claim_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
return 0;
}
-void spi_release_bus(struct spi_slave *slave)
+void spi_release_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
}
@@ -470,8 +470,8 @@ unsigned int spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len)
return min(cntlr.databytes, buf_len);
}
-int spi_xfer(struct spi_slave *slave, const void *dout,
- unsigned int bytesout, void *din, unsigned int bytesin)
+int spi_xfer(const struct spi_slave *slave, const void *dout,
+ size_t bytesout, void *din, size_t bytesin)
{
uint16_t control;
int16_t opcode_index;
diff --git a/src/soc/intel/broadwell/spi.c b/src/soc/intel/broadwell/spi.c
index c7ac09c7de..6aa7dd33a8 100644
--- a/src/soc/intel/broadwell/spi.c
+++ b/src/soc/intel/broadwell/spi.c
@@ -313,13 +313,13 @@ static void spi_init_cb(void *unused)
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, spi_init_cb, NULL);
-int spi_claim_bus(struct spi_slave *slave)
+int spi_claim_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
return 0;
}
-void spi_release_bus(struct spi_slave *slave)
+void spi_release_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
}
@@ -485,8 +485,8 @@ unsigned int spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len)
return min(cntlr.databytes, buf_len);
}
-int spi_xfer(struct spi_slave *slave, const void *dout,
- unsigned int bytesout, void *din, unsigned int bytesin)
+int spi_xfer(const struct spi_slave *slave, const void *dout,
+ size_t bytesout, void *din, size_t bytesin)
{
uint16_t control;
int16_t opcode_index;
diff --git a/src/soc/intel/fsp_baytrail/spi.c b/src/soc/intel/fsp_baytrail/spi.c
index 1ab73f3ae3..232366c63b 100644
--- a/src/soc/intel/fsp_baytrail/spi.c
+++ b/src/soc/intel/fsp_baytrail/spi.c
@@ -297,13 +297,13 @@ void spi_init(void)
cntlr.preop = &ich9_spi->preop;
}
-int spi_claim_bus(struct spi_slave *slave)
+int spi_claim_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
return 0;
}
-void spi_release_bus(struct spi_slave *slave)
+void spi_release_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
}
@@ -469,8 +469,8 @@ unsigned int spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len)
return min(cntlr.databytes, buf_len);
}
-int spi_xfer(struct spi_slave *slave, const void *dout,
- unsigned int bytesout, void *din, unsigned int bytesin)
+int spi_xfer(const struct spi_slave *slave, const void *dout,
+ size_t bytesout, void *din, size_t bytesin)
{
uint16_t control;
int16_t opcode_index;
diff --git a/src/soc/intel/fsp_broadwell_de/spi.c b/src/soc/intel/fsp_broadwell_de/spi.c
index 116001f010..c38fbce7b7 100644
--- a/src/soc/intel/fsp_broadwell_de/spi.c
+++ b/src/soc/intel/fsp_broadwell_de/spi.c
@@ -312,13 +312,13 @@ void spi_init(void)
pci_write_config_byte(dev, 0xdc, bios_cntl | 0x1);
}
-int spi_claim_bus(struct spi_slave *slave)
+int spi_claim_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
return 0;
}
-void spi_release_bus(struct spi_slave *slave)
+void spi_release_bus(const struct spi_slave *slave)
{
/* Handled by ICH automatically. */
}
@@ -484,8 +484,8 @@ unsigned int spi_crop_chunk(unsigned int cmd_len, unsigned int buf_len)
return min(cntlr.databytes, buf_len);
}
-int spi_xfer(struct spi_slave *slave, const void *dout,
- unsigned int bytesout, void *din, unsigned int bytesin)
+int spi_xfer(const struct spi_slave *slave, const void *dout,
+ size_t bytesout, void *din, size_t bytesin)
{
uint16_t control;
int16_t opcode_index;
diff --git a/src/soc/intel/skylake/flash_controller.c b/src/soc/intel/skylake/flash_controller.c
index cc6c20a4be..8aee796218 100644
--- a/src/soc/intel/skylake/flash_controller.c
+++ b/src/soc/intel/skylake/flash_controller.c
@@ -151,8 +151,8 @@ static size_t spi_get_flash_size(pch_spi_regs *spi_bar)
return size;
}
-int spi_xfer(struct spi_slave *slave, const void *dout,
- unsigned int bytesout, void *din, unsigned int bytesin)
+int spi_xfer(const struct spi_slave *slave, const void *dout,
+ size_t bytesout, void *din, size_t bytesin)
{
/* TODO: Define xfer for hardware sequencing. */
return -1;
@@ -170,13 +170,13 @@ void spi_init(void)
pci_write_config_byte(dev, SPIBAR_BIOS_CNTL, bios_cntl);
}
-int spi_claim_bus(struct spi_slave *slave)
+int spi_claim_bus(const struct spi_slave *slave)
{
/* Handled by PCH automatically. */
return 0;
}
-void spi_release_bus(struct spi_slave *slave)
+void spi_release_bus(const struct spi_slave *slave)
{
/* Handled by PCH automatically. */
}