Don't depend on platform_device. Support spi_device
Historically, bmoca only supported platform devices. In struct
moca_priv_data, it stored a pointer to the instance of struct
platform_device that was passed into the probe routine. This pointer was
necessary because bmoca subsequently used data from the platform_data
structure that is linked from the platform_device structure. This data
included fields like chip_id and rf_band.
The problem with this approach was that there is simply no
platform_device for MoCA cores that are connected over SPI like the
BCM6802/BCM6803. Previously, there was a hack where a fake
platform_device was created for those SPI devices, but this hack became
increasingly difficult to maintain.
Let's get rid of this hack. In case of a platform device, copy these
fields like chip_id and rf_band into struct moca_priv_data so that we
no longer need this fake platform device.
Also, add device tree support for SPI devices.
For compatibility with the DesignWare SPI master controller driver in
the new kernel, we had to merge the two SPI transfers into one.
Change-Id: I42070b531d5414f4dfc32dfdf31caa71b5e34492
3 files changed