[PATCH] fsl_spi_init: Support non-QE processors

Grant Likely grant.likely at secretlab.ca
Thu Oct 4 04:17:44 EST 2007


On 10/3/07, Peter Korsgaard <jacmet at sunsite.dk> wrote:
> >>>>> "Grant" == Grant Likely <grant.likely at secretlab.ca> writes:
>
> Hi,
>
>  Grant> Why not just:
>
>  Grant>         np = of_find_node_by_type(NULL, "qe");
>  Grant> +       if (!np)
>  Grant> +               np = of_find_node_by_type(NULL, "soc");
>  Grant>         if (!np)
>  Grant>                 return -ENODEV;
>
> My first iteration did it like that, but then you don't get a -ENODEV
> if the node is missing (and you'll end up using the wrong clock) and
> it doesn't support processors with SPI on and off QE (if that
> exists/will ever exist).

Okay, but you should at least be able confine your determination of
which sysclk value to use to one part of the function.  Otherwise, it
looks good.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195



More information about the Linuxppc-dev mailing list