820-spi-bcm53xx-let-DT-specify-SPI-device-s-instead-hard.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  2. Subject: [PATCH] spi: bcm53xx: let DT specify SPI device(s) instead hardcoding
  3. them
  4. MIME-Version: 1.0
  5. Content-Type: text/plain; charset=UTF-8
  6. Content-Transfer-Encoding: 8bit
  7. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  8. ---
  9. --- a/drivers/spi/spi-bcm53xx.c
  10. +++ b/drivers/spi/spi-bcm53xx.c
  11. @@ -275,10 +275,6 @@ static int bcm53xxspi_flash_read(struct
  12. * BCMA
  13. **************************************************/
  14. -static struct spi_board_info bcm53xx_info = {
  15. - .modalias = "bcm53xxspiflash",
  16. -};
  17. -
  18. static const struct bcma_device_id bcm53xxspi_bcma_tbl[] = {
  19. BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_QSPI, BCMA_ANY_REV, BCMA_ANY_CLASS),
  20. {},
  21. @@ -300,6 +296,7 @@ static int bcm53xxspi_bcma_probe(struct
  22. master = spi_alloc_master(dev, sizeof(*b53spi));
  23. if (!master)
  24. return -ENOMEM;
  25. + master->dev.of_node = dev->of_node;
  26. b53spi = spi_master_get_devdata(master);
  27. b53spi->master = master;
  28. @@ -324,9 +321,6 @@ static int bcm53xxspi_bcma_probe(struct
  29. return err;
  30. }
  31. - /* Broadcom SoCs (at least with the CC rev 42) use SPI for flash only */
  32. - spi_new_device(master, &bcm53xx_info);
  33. -
  34. return 0;
  35. }