[PATCH] [spi_mpc83xx] Always enable legacy support.

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Jul 2 16:18:50 EST 2009


Anton Vorontsov <avorontsov at ru.mvista.com> wrote on 01/07/2009 23:12:12:
>
> On Wed, Jul 01, 2009 at 09:16:12PM +0200, Joakim Tjernlund wrote:
> > There are out of tree boards that need this legacy support too.
>
> Heh.
>
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > ---
> > I hope this is OK. I just discovered that spi didn't work for
> > me in 2.6.30 and I have no time to work on coverting my boards.
>
> I'd convert them for you if they were in-tree. :-) But I don't
> think that moving the kernel backwards because of out-of-tree
> boards is a good thing.

:), but allowing out-of-tree boards one or two kernel releases to catch up
with a legacy printout would have been nice.

>
> > I don't have a clue either on how to do that, any pointers
> > how to add a few spidev devices via OF?
>
> Something like this will work:
>
>       spi at 4c0 {
>          #address-cells = <1>;
>          #size-cells = <0>;
>          cell-index = <0>;
>          compatible = "fsl,spi";
>          reg = <0x4c0 0x40>;
>          interrupts = <2>;
>          interrupt-parent = <&qeic>;
>          /* provide chip-selects here */
>          gpios = <&qe_pio_d 13 0   /* CS0 */
>              &qe_pio_d 14 0>; /* CS1 */
>          mode = "cpu-qe";
>
>          device at 0 {
>             compatible = "spidev";
>             reg = <0>; /* CS0*/
>             spi-max-frequency = <50000000>;
>          };
>
>          device at 0 {
>             compatible = "spidev";
>             reg = <1>; /* CS1 */
>             spi-max-frequency = <50000000>;
>          };
>       };
>
> You can look at arch/powerpc/boot/dts/mpc832x_rdb.dts as an
> example.
>
> Note that "spidev" isn't correct compatible entry to use,
> but it's quick and dirty solution. A proper solution is to
> add a proper compatible entry into the device-tree, and
> add "spidev" alias into drivers/of/base.c:of_modalias_table.

Thanks

  Jocke



More information about the Linuxppc-dev mailing list