devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Chris Brand <chris.brand@broadcom.com>,
	Juri Lelli <juri.lelli@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Jayachandran C <jchandra@broadcom.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv4 2/5] arm: mvebu: support for SMP on 98DX3336 SoC
Date: Wed, 18 Jan 2017 16:47:50 -0800	[thread overview]
Message-ID: <20170119004750.GC4857@codeaurora.org> (raw)
In-Reply-To: <20170113091222.7132-3-chris.packham@alliedtelesis.co.nz>

On 01/13, Chris Packham wrote:
> diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
> index 46c742d3bd41..59be3ca0464f 100644
> --- a/arch/arm/mach-mvebu/platsmp.c
> +++ b/arch/arm/mach-mvebu/platsmp.c
> @@ -184,3 +184,89 @@ const struct smp_operations armada_xp_smp_ops __initconst = {
>  
>  CPU_METHOD_OF_DECLARE(armada_xp_smp, "marvell,armada-xp-smp",
>  		      &armada_xp_smp_ops);
> +
> +struct resume_controller {
> +	u32 resume_control;
> +	u32 resume_boot_addr;
> +};
> +
> +static const struct resume_controller mv98dx3336_resume_controller = {
> +	.resume_control = 0x08,
> +	.resume_boot_addr = 0x04,
> +};
> +
> +static const struct of_device_id of_mv98dx3236_resume_table[] = {
> +	{
> +		.compatible = "marvell,98dx3336-resume-ctrl",
> +		.data = (void *)&mv98dx3336_resume_controller,

Useless cast?

> +	},
> +	{ /* end of list */ },
> +};
> +
> +static int mv98dx3236_resume_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
> +{
> +	const struct of_device_id *match;
> +	struct device_node *np;
> +	void __iomem *base;
> +	struct resume_controller *rc;
> +
> +	WARN_ON(hw_cpu != 1);
> +
> +	np = of_find_matching_node_and_match(NULL, of_mv98dx3236_resume_table,
> +					     &match);
> +	if (!np)
> +		return -ENODEV;
> +
> +	base = of_io_request_and_map(np, 0, of_node_full_name(np));
> +	rc = (struct resume_controller *)match->data;

Useless cast?

> +	of_node_put(np);
> +	if (IS_ERR(base))
> +		return PTR_ERR(base);
> +
> +	writel(0, base + rc->resume_control);
> +	writel(virt_to_phys(boot_addr), base + rc->resume_boot_addr);
> +

Otherwise

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2017-01-19  0:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13  9:12 [PATCHv4 0/5] Support for Marvell switches with integrated CPUs Chris Packham
2017-01-13  9:12 ` [PATCHv4 1/5] clk: mvebu: support for 98DX3236 SoC Chris Packham
2017-01-18 22:25   ` Rob Herring
2017-01-19  3:24     ` Chris Packham
     [not found]   ` <20170113091222.7132-2-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2017-01-21  0:48     ` Stephen Boyd
2017-01-23  7:53       ` Chris Packham
2017-01-23 23:53         ` Stephen Boyd
2017-01-13  9:12 ` [PATCHv4 2/5] arm: mvebu: support for SMP on 98DX3336 SoC Chris Packham
2017-01-19  0:47   ` Stephen Boyd [this message]
2017-01-19  3:23     ` Chris Packham
2017-01-13  9:12 ` [PATCHv4 3/5] pinctrl: mvebu: pinctrl driver for 98DX3236 SoC Chris Packham
2017-01-13  9:54   ` Sebastian Hesselbarth
2017-01-14  7:50     ` Chris Packham
2017-01-19 21:12       ` Chris Packham
     [not found]         ` <66c205acea6046978bf17e6d8fc1959f-5g7mGxlPNYb6GjIOKuZY+ItlCAj8ZROq@public.gmane.org>
2017-01-19 23:19           ` Sebastian Hesselbarth
2017-01-19 23:36             ` Chris Packham
     [not found]   ` <20170113091222.7132-4-chris.packham-6g8wRflRTwXFdCa3tKVlE6U/zSkkHjvu@public.gmane.org>
2017-01-19 10:02     ` Russell King - ARM Linux
2017-01-19 21:10       ` Chris Packham
2017-01-23  8:18         ` Chris Packham
2017-01-26 14:11           ` Linus Walleij
2017-01-13  9:12 ` [PATCHv4 4/5] arm: mvebu: Add device tree for 98DX3236 SoCs Chris Packham
2017-01-13  9:12 ` [PATCHv4 5/5] arm: mvebu: Add device tree for db-dxbc2 and db-xc3-24g4xg boards Chris Packham
2017-01-26 15:17 ` [PATCHv4 0/5] Support for Marvell switches with integrated CPUs Gregory CLEMENT

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=20170119004750.GC4857@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=andrew@lunn.ch \
    --cc=chris.brand@broadcom.com \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=jchandra@broadcom.com \
    --cc=juri.lelli@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=sudeep.holla@arm.com \
    /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).