linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Cyril Bur <cyrilbur@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: stable@vger.kernel.org, Jack Miller <jack@codezen.org>,
	stewart@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2] powernv: Simplify searching for compatible device nodes
Date: Wed, 19 Oct 2016 16:58:15 +1100	[thread overview]
Message-ID: <1476856695.860.2.camel@gmail.com> (raw)
In-Reply-To: <20160811003240.19748-1-jack@codezen.org>

On Wed, 2016-08-10 at 19:32 -0500, Jack Miller wrote:
> This condenses the opal node searching into a single function that
> finds
> all compatible nodes, instead of just searching the ibm,opal
> children,
> for ipmi, flash, and prd similar to how opal-i2c nodes are found.
> 

Hi Michael,

It seems this patch hasn't made it in. Without it linux cannot find the
flash on p9 as skiboot has moved the node to a more appropriate place.

Thanks,

Cyril

Cc: stable@vger.kernel.org # v4.6+

> Signed-off-by: Jack Miller <jack@codezen.org>
> ---
>  arch/powerpc/platforms/powernv/opal.c | 24 +++++++-----------------
>  1 file changed, 7 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/opal.c
> b/arch/powerpc/platforms/powernv/opal.c
> index 8b4fc68..9db12ce 100644
> --- a/arch/powerpc/platforms/powernv/opal.c
> +++ b/arch/powerpc/platforms/powernv/opal.c
> @@ -631,21 +631,11 @@ static void __init opal_dump_region_init(void)
>  			"rc = %d\n", rc);
>  }
>  
> -static void opal_pdev_init(struct device_node *opal_node,
> -		const char *compatible)
> +static void opal_pdev_init(const char *compatible)
>  {
>  	struct device_node *np;
>  
> -	for_each_child_of_node(opal_node, np)
> -		if (of_device_is_compatible(np, compatible))
> -			of_platform_device_create(np, NULL, NULL);
> -}
> -
> -static void opal_i2c_create_devs(void)
> -{
> -	struct device_node *np;
> -
> -	for_each_compatible_node(np, NULL, "ibm,opal-i2c")
> +	for_each_compatible_node(np, NULL, compatible)
>  		of_platform_device_create(np, NULL, NULL);
>  }
>  
> @@ -717,7 +707,7 @@ static int __init opal_init(void)
>  	opal_hmi_handler_init();
>  
>  	/* Create i2c platform devices */
> -	opal_i2c_create_devs();
> +	opal_pdev_init("ibm,opal-i2c");
>  
>  	/* Setup a heatbeat thread if requested by OPAL */
>  	opal_init_heartbeat();
> @@ -752,12 +742,12 @@ static int __init opal_init(void)
>  	}
>  
>  	/* Initialize platform devices: IPMI backend, PRD & flash
> interface */
> -	opal_pdev_init(opal_node, "ibm,opal-ipmi");
> -	opal_pdev_init(opal_node, "ibm,opal-flash");
> -	opal_pdev_init(opal_node, "ibm,opal-prd");
> +	opal_pdev_init("ibm,opal-ipmi");
> +	opal_pdev_init("ibm,opal-flash");
> +	opal_pdev_init("ibm,opal-prd");
>  
>  	/* Initialise platform device: oppanel interface */
> -	opal_pdev_init(opal_node, "ibm,opal-oppanel");
> +	opal_pdev_init("ibm,opal-oppanel");
>  
>  	/* Initialise OPAL kmsg dumper for flushing console on panic
> */
>  	opal_kmsg_init();

  reply	other threads:[~2016-10-19  5:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11  0:32 [PATCH v2] powernv: Simplify searching for compatible device nodes Jack Miller
2016-10-19  5:58 ` Cyril Bur [this message]
2016-11-14 12:17 ` [v2] " Michael Ellerman
  -- strict thread matches above, loose matches on Subject: below --
2016-08-03 16:44 [PATCH] powernv: Search for new flash DT node location Jack Miller
2016-08-03 17:18 ` [PATCH v2] powernv: Simplify searching for compatible device nodes Jack Miller
2016-08-04  7:27   ` Cyril Bur
2016-08-04  8:39     ` Michael Ellerman
2016-08-04 16:03       ` Jack Miller

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=1476856695.860.2.camel@gmail.com \
    --to=cyrilbur@gmail.com \
    --cc=jack@codezen.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=stable@vger.kernel.org \
    --cc=stewart@linux.vnet.ibm.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).