From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/9] sunxi: add sun7i clocks and timer support.
Date: Thu, 1 May 2014 21:28:33 +0200 [thread overview]
Message-ID: <201405012128.34098.marex@denx.de> (raw)
In-Reply-To: <1398969652-32736-1-git-send-email-ijc@hellion.org.uk>
On Thursday, May 01, 2014 at 08:40:44 PM, Ian Campbell wrote:
> This patch adds the basic clocks and timer support for the Allwinner A20
> (sun7i) processor. This code will not been compiled until the build is
> hooked up in a later patch. It has been split out to keep the patches
> manageable.
>
> Some of the code here is common to multiple sunxi subarchtectures, hence
> files are named sun4i which is the earliest similar variant.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Emilio L?pez <emilio@elopez.com.ar>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
> Signed-off-by: Jens Kuske <jenskuske@gmail.com>
> Signed-off-by: Luke Leighton <lkcl@lkcl.net>
> Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Tom Cubie <Mr.hipboi@gmail.com>
> ---
> v4: "Based on d9fe0a1e061e "sunxi: mksunxiboot: remove unnecessary casts."
I have no idea what this changelog entry tells me, I will have to review this
entire patch anew.
[...]
> +void clock_set_pll1(int hz)
> +{
> + int i = 0;
> + int axi, ahb, apb0;
> + struct sunxi_ccm_reg * const ccm =
> + (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
> +
> + /* Find target frequency */
> + while (pll1_para[i].freq < hz)
> + i++;
You can just do a for (...) cycle here, instead of the unbounded while cycle.
Also, I think hz will always be positive, thus int hz -> unsigned int hz .
[...]
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-05-01 19:28 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 18:40 [U-Boot] [PATCH v4 0/9] sunxi: initial upstreamining effort Ian Campbell
2014-05-01 18:40 ` [U-Boot] [PATCH v4 1/9] sunxi: add sun7i clocks and timer support Ian Campbell
2014-05-01 19:28 ` Marek Vasut [this message]
2014-05-01 19:49 ` Ian Campbell
2014-05-01 19:52 ` Ian Campbell
2014-05-01 20:07 ` Ian Campbell
2014-05-01 18:40 ` [U-Boot] [PATCH v4 2/9] sunxi: add sun7i pinmux and gpio support Ian Campbell
2014-05-01 19:50 ` Ian Campbell
2014-05-01 19:51 ` Ian Campbell
2014-05-01 19:54 ` Ian Campbell
2014-05-01 18:40 ` [U-Boot] [PATCH v4 3/9] sunxi: add sun7i dram setup support Ian Campbell
2014-05-01 19:55 ` Ian Campbell
2014-05-02 4:37 ` Marek Vasut
2014-05-01 18:40 ` [U-Boot] [PATCH v4 4/9] sunxi: add sun7i cpu, board and start of day support Ian Campbell
2014-05-01 19:30 ` Marek Vasut
2014-05-02 4:38 ` Marek Vasut
2014-05-02 9:45 ` Marc Zyngier
2014-05-02 12:31 ` Ian Campbell
2014-05-02 13:53 ` [U-Boot] [linux-sunxi] " Marc Zyngier
2014-05-01 18:40 ` [U-Boot] [PATCH v4 5/9] sunxi: add support for Cubietruck booting in FEL mode Ian Campbell
2014-05-02 4:38 ` Marek Vasut
2014-05-01 18:40 ` [U-Boot] [PATCH v4 6/9] sunxi: add gmac Ethernet support Ian Campbell
2014-05-01 20:00 ` Ian Campbell
2014-05-02 4:38 ` Marek Vasut
2014-05-01 18:40 ` [U-Boot] [PATCH v4 7/9] sunxi: mmc support Ian Campbell
2014-05-01 20:01 ` Ian Campbell
2014-05-02 4:40 ` Marek Vasut
2014-05-01 18:40 ` [U-Boot] [PATCH v4 8/9] sunxi: non-FEL SPL boot support for sun7i Ian Campbell
2014-05-01 20:03 ` Ian Campbell
2014-05-02 4:41 ` Marek Vasut
2014-05-01 18:40 ` [U-Boot] [PATCH v4 9/9] net/designware: Reduce DMA burst length Ian Campbell
2014-05-01 18:42 ` Ian Campbell
2014-05-01 19:25 ` [U-Boot] [PATCH v4.1 9/9] net/designware: Make DMA burst length configurable and reduce by default Ian Campbell
2014-05-01 19:24 ` [U-Boot] [PATCH v4 0/9] sunxi: initial upstreamining effort Marek Vasut
2014-05-01 19:42 ` Ian Campbell
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=201405012128.34098.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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