linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v2 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE
Date: Fri, 21 Dec 2007 02:40:53 +0300	[thread overview]
Message-ID: <20071220234053.GA1564@zarina> (raw)
In-Reply-To: <20071220203322.GC19553@localhost.localdomain>

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@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@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

  parent reply	other threads:[~2007-12-20 23:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20 20:27 [PATCH v2 0/4] device_type/compatible cleanups Anton Vorontsov
2007-12-20 20:32 ` [PATCH v2 1/4] [POWERPC] qe_lib and users: get rid of device_type and model Anton Vorontsov
2007-12-20 20:33 ` [PATCH v2 2/4] [POWERPC][NET] ucc_geth_mii and users: get rid of device_type Anton Vorontsov
2007-12-20 20:33 ` [PATCH v2 3/4] [POWERPC][SPI] use brg-frequency for SPI in QE Anton Vorontsov
2007-12-20 23:04   ` [spi-devel-general] " David Brownell
2007-12-20 23:40   ` Anton Vorontsov [this message]
2007-12-20 20:33 ` [PATCH v2 4/4] [POWERPC] fsl_spi_init and users: stop using device_type = "spi" Anton Vorontsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071220234053.GA1564@zarina \
    --to=cbouatmailru@gmail.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).