[PATCH v2 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE
Anton Vorontsov
cbouatmailru at gmail.com
Fri Dec 21 10:40:53 EST 2007
On Thu, Dec 20, 2007 at 11:33:22PM +0300, Anton Vorontsov wrote:
> In case of QE we can use brg-frequency (which is qeclk/2).
> Thus no need to divide sysclk in the spi_mpc83xx.
>
> This patch also adds code to use get_brgfreq() on QE chips.
> Signed-off-by: Anton Vorontsov <avorontsov at ru.mvista.com>
> ---
[...]
> @@ -91,6 +91,11 @@ u32 get_brgfreq(void)
>
> /* Legacy device binding -- will go away when no users are left. */
> node = of_find_node_by_type(NULL, "cpm");
> + if (!node)
> + node = of_find_compatible_node(NULL, NULL, "fsl,qe");
> + if (!node)
> + node = of_find_node_by_type(NULL, "qe");
> +
> if (node) {
> prop = of_get_property(node, "brg-frequency", &size);
I beg your pardon, truly. I just tested this on MPC8323E-RDB. No,
older u-boots doesn't have brg-frequency. So, I must add
of_get_property() for bus-frequency in case of failing
brg-frequency. :-/
I also found few glitches in `fsl_spi_init and users: stop using
device_type = "spi"' patch, regarding of_node_put(). Heh,
of_find_compatible_node() _puts_ `from' argument by itself, which
is not obvious at all.
I'll attach updated patches, with David's Acked-by on SPI driver
part. Other patches seem to be fine though.
Thanks,
p.s. dropping spi-devel list, because only powerpc stuff
affected.
--
Anton Vorontsov
email: cbou at mail.ru
backup email: ya-cbou at yandex.ru
irc://irc.freenode.net/bd2
More information about the Linuxppc-dev
mailing list