[U-Boot] [PATCH 19/19] spi: mpc8xxx: Add DM support

Mario Six mario.six at gdsys.cc
Thu Apr 19 11:45:31 UTC 2018


Hi Jagan,

On Thu, Apr 19, 2018 at 1:32 PM, Jagan Teki <jagannadh.teki at gmail.com> wrote:
> On Tue, Apr 10, 2018 at 4:31 PM, Mario Six <mario.six at gdsys.cc> wrote:
>> Support DM for the MPC8XXX SPI driver.
>>
>> Signed-off-by: Mario Six <mario.six at gdsys.cc>
>> ---
>>  drivers/spi/mpc8xxx_spi.c | 135 +++++++++++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 133 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c
>> index 5724a00585..6e51826665 100644
>> --- a/drivers/spi/mpc8xxx_spi.c
>> +++ b/drivers/spi/mpc8xxx_spi.c
>> @@ -10,6 +10,11 @@
>>  #include <malloc.h>
>>  #include <spi.h>
>>  #include <asm/mpc8xxx_spi.h>
>> +#ifdef CONFIG_DM_SPI
>> +#include <errno.h>
>> +#include <dm.h>
>> +#include <asm-generic/gpio.h>
>> +#endif
>>
>>  enum {
>>         SPI_EV_NE = BIT(31 - 22),       /* Receiver Not Empty */
>> @@ -31,6 +36,14 @@ enum {
>>         SPI_COM_LST = BIT(31 - 9),
>>  };
>>
>> +#ifdef CONFIG_DM_SPI
>
> How about updating this into fully dm-driven with dt or platdata?
>

The series does that, but also keeps the legacy interface to not break boards
in the tree. Once the legacy SPI interface is removed, the compatibility layer
can be removed, and what's left is a pure DM-driver.

Best regards,
Mario


More information about the U-Boot mailing list