diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-11-27 23:12:41 -0500 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-22 14:26:03 -0400 |
commit | ecd0a6f0f2c70a3b713bc77d8a32d6b4ad5ad49b (patch) | |
tree | b194eea24d807eaeaa99fea1d72cd92eef73bb0d | |
parent | 964e61355e94905e4234839d4b41678998d617b7 (diff) |
sfc: Rename SPI stuff to show that it is Falcon-specific
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
-rw-r--r-- | drivers/net/ethernet/sfc/falcon.c | 30 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/mtd.c | 42 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/nic.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/spi.h | 18 |
4 files changed, 47 insertions, 47 deletions
diff --git a/drivers/net/ethernet/sfc/falcon.c b/drivers/net/ethernet/sfc/falcon.c index 983e7f5c4e11..304131b08f17 100644 --- a/drivers/net/ethernet/sfc/falcon.c +++ b/drivers/net/ethernet/sfc/falcon.c | |||
@@ -434,7 +434,7 @@ static int falcon_spi_wait(struct efx_nic *efx) | |||
434 | } | 434 | } |
435 | } | 435 | } |
436 | 436 | ||
437 | int falcon_spi_cmd(struct efx_nic *efx, const struct efx_spi_device *spi, | 437 | int falcon_spi_cmd(struct efx_nic *efx, const struct falcon_spi_device *spi, |
438 | unsigned int command, int address, | 438 | unsigned int command, int address, |
439 | const void *in, void *out, size_t len) | 439 | const void *in, void *out, size_t len) |
440 | { | 440 | { |
@@ -491,22 +491,22 @@ int falcon_spi_cmd(struct efx_nic *efx, const struct efx_spi_device *spi, | |||
491 | } | 491 | } |
492 | 492 | ||
493 | static size_t | 493 | static size_t |
494 | falcon_spi_write_limit(const struct efx_spi_device *spi, size_t start) | 494 | falcon_spi_write_limit(const struct falcon_spi_device *spi, size_t start) |
495 | { | 495 | { |
496 | return min(FALCON_SPI_MAX_LEN, | 496 | return min(FALCON_SPI_MAX_LEN, |
497 | (spi->block_size - (start & (spi->block_size - 1)))); | 497 | (spi->block_size - (start & (spi->block_size - 1)))); |
498 | } | 498 | } |
499 | 499 | ||
500 | static inline u8 | 500 | static inline u8 |
501 | efx_spi_munge_command(const struct efx_spi_device *spi, | 501 | falcon_spi_munge_command(const struct falcon_spi_device *spi, |
502 | const u8 command, const unsigned int address) | 502 | const u8 command, const unsigned int address) |
503 | { | 503 | { |
504 | return command | (((address >> 8) & spi->munge_address) << 3); | 504 | return command | (((address >> 8) & spi->munge_address) << 3); |
505 | } | 505 | } |
506 | 506 | ||
507 | /* Wait up to 10 ms for buffered write completion */ | 507 | /* Wait up to 10 ms for buffered write completion */ |
508 | int | 508 | int |
509 | falcon_spi_wait_write(struct efx_nic *efx, const struct efx_spi_device *spi) | 509 | falcon_spi_wait_write(struct efx_nic *efx, const struct falcon_spi_device *spi) |
510 | { | 510 | { |
511 | unsigned long timeout = jiffies + 1 + DIV_ROUND_UP(HZ, 100); | 511 | unsigned long timeout = jiffies + 1 + DIV_ROUND_UP(HZ, 100); |
512 | u8 status; | 512 | u8 status; |
@@ -530,7 +530,7 @@ falcon_spi_wait_write(struct efx_nic *efx, const struct efx_spi_device *spi) | |||
530 | } | 530 | } |
531 | } | 531 | } |
532 | 532 | ||
533 | int falcon_spi_read(struct efx_nic *efx, const struct efx_spi_device *spi, | 533 | int falcon_spi_read(struct efx_nic *efx, const struct falcon_spi_device *spi, |
534 | loff_t start, size_t len, size_t *retlen, u8 *buffer) | 534 | loff_t start, size_t len, size_t *retlen, u8 *buffer) |
535 | { | 535 | { |
536 | size_t block_len, pos = 0; | 536 | size_t block_len, pos = 0; |
@@ -540,7 +540,7 @@ int falcon_spi_read(struct efx_nic *efx, const struct efx_spi_device *spi, | |||
540 | while (pos < len) { | 540 | while (pos < len) { |
541 | block_len = min(len - pos, FALCON_SPI_MAX_LEN); | 541 | block_len = min(len - pos, FALCON_SPI_MAX_LEN); |
542 | 542 | ||
543 | command = efx_spi_munge_command(spi, SPI_READ, start + pos); | 543 | command = falcon_spi_munge_command(spi, SPI_READ, start + pos); |
544 | rc = falcon_spi_cmd(efx, spi, command, start + pos, NULL, | 544 | rc = falcon_spi_cmd(efx, spi, command, start + pos, NULL, |
545 | buffer + pos, block_len); | 545 | buffer + pos, block_len); |
546 | if (rc) | 546 | if (rc) |
@@ -561,7 +561,7 @@ int falcon_spi_read(struct efx_nic *efx, const struct efx_spi_device *spi, | |||
561 | } | 561 | } |
562 | 562 | ||
563 | int | 563 | int |
564 | falcon_spi_write(struct efx_nic *efx, const struct efx_spi_device *spi, | 564 | falcon_spi_write(struct efx_nic *efx, const struct falcon_spi_device *spi, |
565 | loff_t start, size_t len, size_t *retlen, const u8 *buffer) | 565 | loff_t start, size_t len, size_t *retlen, const u8 *buffer) |
566 | { | 566 | { |
567 | u8 verify_buffer[FALCON_SPI_MAX_LEN]; | 567 | u8 verify_buffer[FALCON_SPI_MAX_LEN]; |
@@ -576,7 +576,7 @@ falcon_spi_write(struct efx_nic *efx, const struct efx_spi_device *spi, | |||
576 | 576 | ||
577 | block_len = min(len - pos, | 577 | block_len = min(len - pos, |
578 | falcon_spi_write_limit(spi, start + pos)); | 578 | falcon_spi_write_limit(spi, start + pos)); |
579 | command = efx_spi_munge_command(spi, SPI_WRITE, start + pos); | 579 | command = falcon_spi_munge_command(spi, SPI_WRITE, start + pos); |
580 | rc = falcon_spi_cmd(efx, spi, command, start + pos, | 580 | rc = falcon_spi_cmd(efx, spi, command, start + pos, |
581 | buffer + pos, NULL, block_len); | 581 | buffer + pos, NULL, block_len); |
582 | if (rc) | 582 | if (rc) |
@@ -586,7 +586,7 @@ falcon_spi_write(struct efx_nic *efx, const struct efx_spi_device *spi, | |||
586 | if (rc) | 586 | if (rc) |
587 | break; | 587 | break; |
588 | 588 | ||
589 | command = efx_spi_munge_command(spi, SPI_READ, start + pos); | 589 | command = falcon_spi_munge_command(spi, SPI_READ, start + pos); |
590 | rc = falcon_spi_cmd(efx, spi, command, start + pos, | 590 | rc = falcon_spi_cmd(efx, spi, command, start + pos, |
591 | NULL, verify_buffer, block_len); | 591 | NULL, verify_buffer, block_len); |
592 | if (memcmp(verify_buffer, buffer + pos, block_len)) { | 592 | if (memcmp(verify_buffer, buffer + pos, block_len)) { |
@@ -1481,15 +1481,15 @@ falcon_read_nvram(struct efx_nic *efx, struct falcon_nvconfig *nvconfig_out) | |||
1481 | { | 1481 | { |
1482 | struct falcon_nic_data *nic_data = efx->nic_data; | 1482 | struct falcon_nic_data *nic_data = efx->nic_data; |
1483 | struct falcon_nvconfig *nvconfig; | 1483 | struct falcon_nvconfig *nvconfig; |
1484 | struct efx_spi_device *spi; | 1484 | struct falcon_spi_device *spi; |
1485 | void *region; | 1485 | void *region; |
1486 | int rc, magic_num, struct_ver; | 1486 | int rc, magic_num, struct_ver; |
1487 | __le16 *word, *limit; | 1487 | __le16 *word, *limit; |
1488 | u32 csum; | 1488 | u32 csum; |
1489 | 1489 | ||
1490 | if (efx_spi_present(&nic_data->spi_flash)) | 1490 | if (falcon_spi_present(&nic_data->spi_flash)) |
1491 | spi = &nic_data->spi_flash; | 1491 | spi = &nic_data->spi_flash; |
1492 | else if (efx_spi_present(&nic_data->spi_eeprom)) | 1492 | else if (falcon_spi_present(&nic_data->spi_eeprom)) |
1493 | spi = &nic_data->spi_eeprom; | 1493 | spi = &nic_data->spi_eeprom; |
1494 | else | 1494 | else |
1495 | return -EINVAL; | 1495 | return -EINVAL; |
@@ -1504,7 +1504,7 @@ falcon_read_nvram(struct efx_nic *efx, struct falcon_nvconfig *nvconfig_out) | |||
1504 | mutex_unlock(&nic_data->spi_lock); | 1504 | mutex_unlock(&nic_data->spi_lock); |
1505 | if (rc) { | 1505 | if (rc) { |
1506 | netif_err(efx, hw, efx->net_dev, "Failed to read %s\n", | 1506 | netif_err(efx, hw, efx->net_dev, "Failed to read %s\n", |
1507 | efx_spi_present(&nic_data->spi_flash) ? | 1507 | falcon_spi_present(&nic_data->spi_flash) ? |
1508 | "flash" : "EEPROM"); | 1508 | "flash" : "EEPROM"); |
1509 | rc = -EIO; | 1509 | rc = -EIO; |
1510 | goto out; | 1510 | goto out; |
@@ -1849,7 +1849,7 @@ static int falcon_reset_sram(struct efx_nic *efx) | |||
1849 | } | 1849 | } |
1850 | 1850 | ||
1851 | static void falcon_spi_device_init(struct efx_nic *efx, | 1851 | static void falcon_spi_device_init(struct efx_nic *efx, |
1852 | struct efx_spi_device *spi_device, | 1852 | struct falcon_spi_device *spi_device, |
1853 | unsigned int device_id, u32 device_type) | 1853 | unsigned int device_id, u32 device_type) |
1854 | { | 1854 | { |
1855 | if (device_type != 0) { | 1855 | if (device_type != 0) { |
diff --git a/drivers/net/ethernet/sfc/mtd.c b/drivers/net/ethernet/sfc/mtd.c index 08f825b71ac8..e4b35c61e90b 100644 --- a/drivers/net/ethernet/sfc/mtd.c +++ b/drivers/net/ethernet/sfc/mtd.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include "mcdi.h" | 22 | #include "mcdi.h" |
23 | #include "mcdi_pcol.h" | 23 | #include "mcdi_pcol.h" |
24 | 24 | ||
25 | #define EFX_SPI_VERIFY_BUF_LEN 16 | 25 | #define FALCON_SPI_VERIFY_BUF_LEN 16 |
26 | 26 | ||
27 | struct efx_mtd_partition { | 27 | struct efx_mtd_partition { |
28 | struct mtd_info mtd; | 28 | struct mtd_info mtd; |
@@ -50,7 +50,7 @@ struct efx_mtd_ops { | |||
50 | struct efx_mtd { | 50 | struct efx_mtd { |
51 | struct list_head node; | 51 | struct list_head node; |
52 | struct efx_nic *efx; | 52 | struct efx_nic *efx; |
53 | const struct efx_spi_device *spi; | 53 | const struct falcon_spi_device *spi; |
54 | const char *name; | 54 | const char *name; |
55 | const struct efx_mtd_ops *ops; | 55 | const struct efx_mtd_ops *ops; |
56 | size_t n_parts; | 56 | size_t n_parts; |
@@ -71,10 +71,10 @@ static int siena_mtd_probe(struct efx_nic *efx); | |||
71 | /* SPI utilities */ | 71 | /* SPI utilities */ |
72 | 72 | ||
73 | static int | 73 | static int |
74 | efx_spi_slow_wait(struct efx_mtd_partition *part, bool uninterruptible) | 74 | falcon_spi_slow_wait(struct efx_mtd_partition *part, bool uninterruptible) |
75 | { | 75 | { |
76 | struct efx_mtd *efx_mtd = part->mtd.priv; | 76 | struct efx_mtd *efx_mtd = part->mtd.priv; |
77 | const struct efx_spi_device *spi = efx_mtd->spi; | 77 | const struct falcon_spi_device *spi = efx_mtd->spi; |
78 | struct efx_nic *efx = efx_mtd->efx; | 78 | struct efx_nic *efx = efx_mtd->efx; |
79 | u8 status; | 79 | u8 status; |
80 | int rc, i; | 80 | int rc, i; |
@@ -98,7 +98,7 @@ efx_spi_slow_wait(struct efx_mtd_partition *part, bool uninterruptible) | |||
98 | } | 98 | } |
99 | 99 | ||
100 | static int | 100 | static int |
101 | efx_spi_unlock(struct efx_nic *efx, const struct efx_spi_device *spi) | 101 | falcon_spi_unlock(struct efx_nic *efx, const struct falcon_spi_device *spi) |
102 | { | 102 | { |
103 | const u8 unlock_mask = (SPI_STATUS_BP2 | SPI_STATUS_BP1 | | 103 | const u8 unlock_mask = (SPI_STATUS_BP2 | SPI_STATUS_BP1 | |
104 | SPI_STATUS_BP0); | 104 | SPI_STATUS_BP0); |
@@ -133,14 +133,14 @@ efx_spi_unlock(struct efx_nic *efx, const struct efx_spi_device *spi) | |||
133 | } | 133 | } |
134 | 134 | ||
135 | static int | 135 | static int |
136 | efx_spi_erase(struct efx_mtd_partition *part, loff_t start, size_t len) | 136 | falcon_spi_erase(struct efx_mtd_partition *part, loff_t start, size_t len) |
137 | { | 137 | { |
138 | struct efx_mtd *efx_mtd = part->mtd.priv; | 138 | struct efx_mtd *efx_mtd = part->mtd.priv; |
139 | const struct efx_spi_device *spi = efx_mtd->spi; | 139 | const struct falcon_spi_device *spi = efx_mtd->spi; |
140 | struct efx_nic *efx = efx_mtd->efx; | 140 | struct efx_nic *efx = efx_mtd->efx; |
141 | unsigned pos, block_len; | 141 | unsigned pos, block_len; |
142 | u8 empty[EFX_SPI_VERIFY_BUF_LEN]; | 142 | u8 empty[FALCON_SPI_VERIFY_BUF_LEN]; |
143 | u8 buffer[EFX_SPI_VERIFY_BUF_LEN]; | 143 | u8 buffer[FALCON_SPI_VERIFY_BUF_LEN]; |
144 | int rc; | 144 | int rc; |
145 | 145 | ||
146 | if (len != spi->erase_size) | 146 | if (len != spi->erase_size) |
@@ -149,7 +149,7 @@ efx_spi_erase(struct efx_mtd_partition *part, loff_t start, size_t len) | |||
149 | if (spi->erase_command == 0) | 149 | if (spi->erase_command == 0) |
150 | return -EOPNOTSUPP; | 150 | return -EOPNOTSUPP; |
151 | 151 | ||
152 | rc = efx_spi_unlock(efx, spi); | 152 | rc = falcon_spi_unlock(efx, spi); |
153 | if (rc) | 153 | if (rc) |
154 | return rc; | 154 | return rc; |
155 | rc = falcon_spi_cmd(efx, spi, SPI_WREN, -1, NULL, NULL, 0); | 155 | rc = falcon_spi_cmd(efx, spi, SPI_WREN, -1, NULL, NULL, 0); |
@@ -159,7 +159,7 @@ efx_spi_erase(struct efx_mtd_partition *part, loff_t start, size_t len) | |||
159 | NULL, 0); | 159 | NULL, 0); |
160 | if (rc) | 160 | if (rc) |
161 | return rc; | 161 | return rc; |
162 | rc = efx_spi_slow_wait(part, false); | 162 | rc = falcon_spi_slow_wait(part, false); |
163 | 163 | ||
164 | /* Verify the entire region has been wiped */ | 164 | /* Verify the entire region has been wiped */ |
165 | memset(empty, 0xff, sizeof(empty)); | 165 | memset(empty, 0xff, sizeof(empty)); |
@@ -319,7 +319,7 @@ static int falcon_mtd_read(struct mtd_info *mtd, loff_t start, | |||
319 | { | 319 | { |
320 | struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); | 320 | struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); |
321 | struct efx_mtd *efx_mtd = mtd->priv; | 321 | struct efx_mtd *efx_mtd = mtd->priv; |
322 | const struct efx_spi_device *spi = efx_mtd->spi; | 322 | const struct falcon_spi_device *spi = efx_mtd->spi; |
323 | struct efx_nic *efx = efx_mtd->efx; | 323 | struct efx_nic *efx = efx_mtd->efx; |
324 | struct falcon_nic_data *nic_data = efx->nic_data; | 324 | struct falcon_nic_data *nic_data = efx->nic_data; |
325 | int rc; | 325 | int rc; |
@@ -344,7 +344,7 @@ static int falcon_mtd_erase(struct mtd_info *mtd, loff_t start, size_t len) | |||
344 | rc = mutex_lock_interruptible(&nic_data->spi_lock); | 344 | rc = mutex_lock_interruptible(&nic_data->spi_lock); |
345 | if (rc) | 345 | if (rc) |
346 | return rc; | 346 | return rc; |
347 | rc = efx_spi_erase(part, part->offset + start, len); | 347 | rc = falcon_spi_erase(part, part->offset + start, len); |
348 | mutex_unlock(&nic_data->spi_lock); | 348 | mutex_unlock(&nic_data->spi_lock); |
349 | return rc; | 349 | return rc; |
350 | } | 350 | } |
@@ -354,7 +354,7 @@ static int falcon_mtd_write(struct mtd_info *mtd, loff_t start, | |||
354 | { | 354 | { |
355 | struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); | 355 | struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); |
356 | struct efx_mtd *efx_mtd = mtd->priv; | 356 | struct efx_mtd *efx_mtd = mtd->priv; |
357 | const struct efx_spi_device *spi = efx_mtd->spi; | 357 | const struct falcon_spi_device *spi = efx_mtd->spi; |
358 | struct efx_nic *efx = efx_mtd->efx; | 358 | struct efx_nic *efx = efx_mtd->efx; |
359 | struct falcon_nic_data *nic_data = efx->nic_data; | 359 | struct falcon_nic_data *nic_data = efx->nic_data; |
360 | int rc; | 360 | int rc; |
@@ -377,7 +377,7 @@ static int falcon_mtd_sync(struct mtd_info *mtd) | |||
377 | int rc; | 377 | int rc; |
378 | 378 | ||
379 | mutex_lock(&nic_data->spi_lock); | 379 | mutex_lock(&nic_data->spi_lock); |
380 | rc = efx_spi_slow_wait(part, true); | 380 | rc = falcon_spi_slow_wait(part, true); |
381 | mutex_unlock(&nic_data->spi_lock); | 381 | mutex_unlock(&nic_data->spi_lock); |
382 | return rc; | 382 | return rc; |
383 | } | 383 | } |
@@ -392,14 +392,14 @@ static const struct efx_mtd_ops falcon_mtd_ops = { | |||
392 | static int falcon_mtd_probe(struct efx_nic *efx) | 392 | static int falcon_mtd_probe(struct efx_nic *efx) |
393 | { | 393 | { |
394 | struct falcon_nic_data *nic_data = efx->nic_data; | 394 | struct falcon_nic_data *nic_data = efx->nic_data; |
395 | struct efx_spi_device *spi; | 395 | struct falcon_spi_device *spi; |
396 | struct efx_mtd *efx_mtd; | 396 | struct efx_mtd *efx_mtd; |
397 | int rc = -ENODEV; | 397 | int rc = -ENODEV; |
398 | 398 | ||
399 | ASSERT_RTNL(); | 399 | ASSERT_RTNL(); |
400 | 400 | ||
401 | spi = &nic_data->spi_flash; | 401 | spi = &nic_data->spi_flash; |
402 | if (efx_spi_present(spi) && spi->size > FALCON_FLASH_BOOTCODE_START) { | 402 | if (falcon_spi_present(spi) && spi->size > FALCON_FLASH_BOOTCODE_START) { |
403 | efx_mtd = kzalloc(sizeof(*efx_mtd) + sizeof(efx_mtd->part[0]), | 403 | efx_mtd = kzalloc(sizeof(*efx_mtd) + sizeof(efx_mtd->part[0]), |
404 | GFP_KERNEL); | 404 | GFP_KERNEL); |
405 | if (!efx_mtd) | 405 | if (!efx_mtd) |
@@ -425,7 +425,7 @@ static int falcon_mtd_probe(struct efx_nic *efx) | |||
425 | } | 425 | } |
426 | 426 | ||
427 | spi = &nic_data->spi_eeprom; | 427 | spi = &nic_data->spi_eeprom; |
428 | if (efx_spi_present(spi) && spi->size > EFX_EEPROM_BOOTCONFIG_START) { | 428 | if (falcon_spi_present(spi) && spi->size > FALCON_EEPROM_BOOTCONFIG_START) { |
429 | efx_mtd = kzalloc(sizeof(*efx_mtd) + sizeof(efx_mtd->part[0]), | 429 | efx_mtd = kzalloc(sizeof(*efx_mtd) + sizeof(efx_mtd->part[0]), |
430 | GFP_KERNEL); | 430 | GFP_KERNEL); |
431 | if (!efx_mtd) | 431 | if (!efx_mtd) |
@@ -439,10 +439,10 @@ static int falcon_mtd_probe(struct efx_nic *efx) | |||
439 | efx_mtd->part[0].mtd.type = MTD_RAM; | 439 | efx_mtd->part[0].mtd.type = MTD_RAM; |
440 | efx_mtd->part[0].mtd.flags = MTD_CAP_RAM; | 440 | efx_mtd->part[0].mtd.flags = MTD_CAP_RAM; |
441 | efx_mtd->part[0].mtd.size = | 441 | efx_mtd->part[0].mtd.size = |
442 | min(spi->size, EFX_EEPROM_BOOTCONFIG_END) - | 442 | min(spi->size, FALCON_EEPROM_BOOTCONFIG_END) - |
443 | EFX_EEPROM_BOOTCONFIG_START; | 443 | FALCON_EEPROM_BOOTCONFIG_START; |
444 | efx_mtd->part[0].mtd.erasesize = spi->erase_size; | 444 | efx_mtd->part[0].mtd.erasesize = spi->erase_size; |
445 | efx_mtd->part[0].offset = EFX_EEPROM_BOOTCONFIG_START; | 445 | efx_mtd->part[0].offset = FALCON_EEPROM_BOOTCONFIG_START; |
446 | efx_mtd->part[0].type_name = "sfc_bootconfig"; | 446 | efx_mtd->part[0].type_name = "sfc_bootconfig"; |
447 | 447 | ||
448 | rc = efx_mtd_probe_device(efx, efx_mtd); | 448 | rc = efx_mtd_probe_device(efx, efx_mtd); |
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h index 8baf6a1d2ac8..b90dc8a24cca 100644 --- a/drivers/net/ethernet/sfc/nic.h +++ b/drivers/net/ethernet/sfc/nic.h | |||
@@ -184,8 +184,8 @@ struct falcon_nic_data { | |||
184 | bool stats_pending; | 184 | bool stats_pending; |
185 | struct timer_list stats_timer; | 185 | struct timer_list stats_timer; |
186 | u32 *stats_dma_done; | 186 | u32 *stats_dma_done; |
187 | struct efx_spi_device spi_flash; | 187 | struct falcon_spi_device spi_flash; |
188 | struct efx_spi_device spi_eeprom; | 188 | struct falcon_spi_device spi_eeprom; |
189 | struct mutex spi_lock; | 189 | struct mutex spi_lock; |
190 | struct mutex mdio_lock; | 190 | struct mutex mdio_lock; |
191 | bool xmac_poll_required; | 191 | bool xmac_poll_required; |
diff --git a/drivers/net/ethernet/sfc/spi.h b/drivers/net/ethernet/sfc/spi.h index 5431a1bbff5c..ee951feb0100 100644 --- a/drivers/net/ethernet/sfc/spi.h +++ b/drivers/net/ethernet/sfc/spi.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #define SPI_STATUS_NRDY 0x01 /* Device busy flag */ | 35 | #define SPI_STATUS_NRDY 0x01 /* Device busy flag */ |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * struct efx_spi_device - an Efx SPI (Serial Peripheral Interface) device | 38 | * struct falcon_spi_device - a Falcon SPI (Serial Peripheral Interface) device |
39 | * @device_id: Controller's id for the device | 39 | * @device_id: Controller's id for the device |
40 | * @size: Size (in bytes) | 40 | * @size: Size (in bytes) |
41 | * @addr_len: Number of address bytes in read/write commands | 41 | * @addr_len: Number of address bytes in read/write commands |
@@ -51,7 +51,7 @@ | |||
51 | * @block_size: Write block size (in bytes). | 51 | * @block_size: Write block size (in bytes). |
52 | * Write commands are limited to blocks with this size and alignment. | 52 | * Write commands are limited to blocks with this size and alignment. |
53 | */ | 53 | */ |
54 | struct efx_spi_device { | 54 | struct falcon_spi_device { |
55 | int device_id; | 55 | int device_id; |
56 | unsigned int size; | 56 | unsigned int size; |
57 | unsigned int addr_len; | 57 | unsigned int addr_len; |
@@ -61,21 +61,21 @@ struct efx_spi_device { | |||
61 | unsigned int block_size; | 61 | unsigned int block_size; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static inline bool efx_spi_present(const struct efx_spi_device *spi) | 64 | static inline bool falcon_spi_present(const struct falcon_spi_device *spi) |
65 | { | 65 | { |
66 | return spi->size != 0; | 66 | return spi->size != 0; |
67 | } | 67 | } |
68 | 68 | ||
69 | int falcon_spi_cmd(struct efx_nic *efx, | 69 | int falcon_spi_cmd(struct efx_nic *efx, |
70 | const struct efx_spi_device *spi, unsigned int command, | 70 | const struct falcon_spi_device *spi, unsigned int command, |
71 | int address, const void *in, void *out, size_t len); | 71 | int address, const void *in, void *out, size_t len); |
72 | int falcon_spi_wait_write(struct efx_nic *efx, | 72 | int falcon_spi_wait_write(struct efx_nic *efx, |
73 | const struct efx_spi_device *spi); | 73 | const struct falcon_spi_device *spi); |
74 | int falcon_spi_read(struct efx_nic *efx, | 74 | int falcon_spi_read(struct efx_nic *efx, |
75 | const struct efx_spi_device *spi, loff_t start, | 75 | const struct falcon_spi_device *spi, loff_t start, |
76 | size_t len, size_t *retlen, u8 *buffer); | 76 | size_t len, size_t *retlen, u8 *buffer); |
77 | int falcon_spi_write(struct efx_nic *efx, | 77 | int falcon_spi_write(struct efx_nic *efx, |
78 | const struct efx_spi_device *spi, loff_t start, | 78 | const struct falcon_spi_device *spi, loff_t start, |
79 | size_t len, size_t *retlen, const u8 *buffer); | 79 | size_t len, size_t *retlen, const u8 *buffer); |
80 | 80 | ||
81 | /* | 81 | /* |
@@ -93,7 +93,7 @@ int falcon_spi_write(struct efx_nic *efx, | |||
93 | */ | 93 | */ |
94 | #define FALCON_NVCONFIG_END 0x400U | 94 | #define FALCON_NVCONFIG_END 0x400U |
95 | #define FALCON_FLASH_BOOTCODE_START 0x8000U | 95 | #define FALCON_FLASH_BOOTCODE_START 0x8000U |
96 | #define EFX_EEPROM_BOOTCONFIG_START 0x800U | 96 | #define FALCON_EEPROM_BOOTCONFIG_START 0x800U |
97 | #define EFX_EEPROM_BOOTCONFIG_END 0x1800U | 97 | #define FALCON_EEPROM_BOOTCONFIG_END 0x1800U |
98 | 98 | ||
99 | #endif /* EFX_SPI_H */ | 99 | #endif /* EFX_SPI_H */ |