From: linux@prisktech.co.nz (Tony Prisk)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/11] ARM: nomadik: initial devicetree support
Date: Mon, 14 Jan 2013 20:26:22 +1300 [thread overview]
Message-ID: <1358148382.2198.2.camel@gitbox> (raw)
In-Reply-To: <1357599359-7385-1-git-send-email-linus.walleij@linaro.org>
On Mon, 2013-01-07 at 23:55 +0100, Linus Walleij wrote:
> Support basic device tree boot on the Nomadik. Implement the
> support in the cpu file with the intent of deleting the board
> files later. At this stage IRQ controllers, system timer,
> l2x0 cache, UARTs and thus console boot is fully functional.
> Patch out the code adding devices by initcalls for now so
> as not to disturb the boot.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
...
> +static void __init cpu8815_timer_init_of(void)
> +{
> + struct device_node *mtu;
> + void __iomem *base;
> + int irq;
> + u32 src_cr;
> +
> + mtu = of_find_node_by_path("/mtu0");
> + if (!mtu)
> + return;
> + base = of_iomap(mtu, 0);
> + if (WARN_ON(!base))
> + return;
> + irq = irq_of_parse_and_map(mtu, 0);
> +
> + pr_info("Remapped MTU @ %p, irq: %d\n", base, irq);
> +
> + /* Configure timer sources in "system reset controller" ctrl reg */
> + src_cr = readl(base);
> + src_cr &= SRC_CR_INIT_MASK;
> + src_cr |= SRC_CR_INIT_VAL;
> + writel(src_cr, base);
> +
> + nmdk_timer_init(base, irq);
> +}
> +
> +struct sys_timer cpu8815_of_timer = {
> + .init = cpu8815_timer_init_of,
> +};
> +
struct sys_timer is disappearing in 3.9
>+DT_MACHINE_START(NOMADIK_DT, "ST-Ericsson Nomadik 8815")
>+ .map_io = cpu8815_map_io,
>+ .init_irq = cpu8815_init_irq_of,
>+ .handle_irq = vic_handle_irq,
>+ .timer = &cpu8815_of_timer,
>+ .init_machine = cpu8815_init_of,
>+ .restart = cpu8815_restart,
>+ .dt_compat = cpu8815_board_compat,
>+MACHINE_END
You will be able to use .init_timer = cpu8815_of_timer in place of the
struct sys_timer.
The patches for this change are in arm-soc: timer/cleanup.
Regards
Tony P
next prev parent reply other threads:[~2013-01-14 7:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 22:55 [PATCH 02/11] ARM: nomadik: initial devicetree support Linus Walleij
2013-01-08 9:57 ` Mark Rutland
2013-01-11 17:04 ` Grant Likely
2013-01-11 17:57 ` Mark Rutland
2013-01-14 7:02 ` Linus Walleij
2013-01-14 10:00 ` Mark Rutland
2013-01-14 7:26 ` Tony Prisk [this message]
2013-01-14 7:51 ` Linus Walleij
2013-01-14 7:52 ` Linus Walleij
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=1358148382.2198.2.camel@gitbox \
--to=linux@prisktech.co.nz \
--cc=linux-arm-kernel@lists.infradead.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).