[U-Boot] [PATCH v2 9/9] spi, mpc8xx: migrate to DM_SPI

Jagan Teki jagan at amarulasolutions.com
Wed Nov 21 09:09:19 UTC 2018


On Wed, Nov 21, 2018 at 2:21 PM Christophe Leroy
<christophe.leroy at c-s.fr> wrote:
>
> Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>
> ---
>  drivers/spi/mpc8xx_spi.c | 179 ++++++++---------------------------------------

Update Kconfig to move the config definition in DM_SPI area.

>
>         /* Setting tx bd status and data length */
> +       out_be32(&tbdf->cbd_bufaddr, (ulong)dout);
>         out_be16(&tbdf->cbd_sc, BD_SC_READY | BD_SC_LAST | BD_SC_WRAP);
>         out_be16(&tbdf->cbd_datlen, count);
>
>         /* Setting rx bd status and data length */
> +       out_be32(&rbdf->cbd_bufaddr, (ulong)din);
>         out_be16(&rbdf->cbd_sc, BD_SC_EMPTY | BD_SC_WRAP);
>         out_be16(&rbdf->cbd_datlen, 0);  /* rx length has no significance */
>
> @@ -333,3 +197,20 @@ ssize_t spi_xfer(size_t count)
>
>         return count;
>  }
> +
> +static const struct dm_spi_ops mpc8xx_spi_ops = {
> +       .xfer           = mpc8xx_spi_xfer,
> +};
> +
> +static const struct udevice_id mpc8xx_spi_ids[] = {
> +       { .compatible = "fsl,mpc8xx-spi" },

Is this binding from Linux?


More information about the U-Boot mailing list