All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Fleming <afleming@gmail.com>
To: linuxppc-dev@lists.ozlabs.org, scottwood@freescale.com
Cc: aperez@alexperez.com
Subject: [PATCH 3/3] corenet: Switch to of_platform_default_populate
Date: Sun, 23 Oct 2016 18:48:39 -0500	[thread overview]
Message-ID: <1477266519-25173-3-git-send-email-afleming@gmail.com> (raw)
In-Reply-To: <1477266519-25173-1-git-send-email-afleming@gmail.com>

Many of the embedded powerpc boards use an array of device names
to register the devices from the device tree. Instead, we can use
of_platform_default_populate(), which will iterate through all the root nodes and register them.

Signed-off-by: Andy Fleming <afleming@gmail.com>
---
This is necessary to enable the gpio power/reset pins on the Cyrus board.

I have confirmed that the PCI devices are registered and that the power/reset
drivers are registered (and functional). I also tested USB, and saw the
onboard MMC card report in, so some of the SoC devices are definitely there.

If this doesn't break the other corenet boards, I'd be happy to make the
same change for the other powerpc boards.

 arch/powerpc/platforms/85xx/corenet_generic.c | 49 +--------------------------
 1 file changed, 1 insertion(+), 48 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c
index 1179115..6347f20 100644
--- a/arch/powerpc/platforms/85xx/corenet_generic.c
+++ b/arch/powerpc/platforms/85xx/corenet_generic.c
@@ -83,56 +83,9 @@ void __init corenet_gen_setup_arch(void)
 	mpc85xx_qe_init();
 }
 
-static const struct of_device_id of_device_ids[] = {
-	{
-		.compatible	= "simple-bus"
-	},
-	{
-		.compatible	= "mdio-mux-gpio"
-	},
-	{
-		.compatible	= "fsl,fpga-ngpixis"
-	},
-	{
-		.compatible	= "fsl,fpga-qixis"
-	},
-	{
-		.compatible	= "fsl,srio",
-	},
-	{
-		.compatible	= "fsl,p4080-pcie",
-	},
-	{
-		.compatible	= "fsl,qoriq-pcie-v2.2",
-	},
-	{
-		.compatible	= "fsl,qoriq-pcie-v2.3",
-	},
-	{
-		.compatible	= "fsl,qoriq-pcie-v2.4",
-	},
-	{
-		.compatible	= "fsl,qoriq-pcie-v3.0",
-	},
-	{
-		.compatible	= "fsl,qe",
-	},
-	{
-		.compatible    = "fsl,fman",
-	},
-	/* The following two are for the Freescale hypervisor */
-	{
-		.name		= "hypervisor",
-	},
-	{
-		.name		= "handles",
-	},
-	{}
-};
-
 int __init corenet_gen_publish_devices(void)
 {
-	return of_platform_bus_probe(NULL, of_device_ids, NULL);
+	return of_platform_default_populate(NULL, NULL, NULL);
 }
 
 static const char * const boards[] __initconst = {
-- 
1.9.1

  parent reply	other threads:[~2016-10-23 23:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-23 23:48 [PATCH v2 1/3] cyrus: Add poweroff/reset support Andy Fleming
2016-10-23 23:48 ` [PATCH 2/3] 85xx: Enable gpio power/reset driver Andy Fleming
2016-10-24 16:16   ` Cyrus_5040.dts Misisng luigi burdo
2017-07-05 15:37   ` 85xx: Enable gpio power/reset driver Darren Stevens
2016-10-23 23:48 ` Andy Fleming [this message]
2016-10-24 21:43   ` [PATCH 3/3] corenet: Switch to of_platform_default_populate Scott Wood
2016-11-23  7:00 ` [v2,1/3] cyrus: Add poweroff/reset support Scott Wood

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=1477266519-25173-3-git-send-email-afleming@gmail.com \
    --to=afleming@gmail.com \
    --cc=aperez@alexperez.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=scottwood@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.