From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway-1237.mvista.com (gateway-1237.mvista.com [63.81.120.158]) by ozlabs.org (Postfix) with ESMTP id C034ADDE02 for ; Wed, 1 Aug 2007 08:02:28 +1000 (EST) Date: Tue, 31 Jul 2007 15:05:53 -0700 From: Dave Jiang To: galak@kernel.crashing.org Subject: [PATCH v2 1/3] powerpc: publish 85xx soc dts entries as of_device on cds and ads platforms Message-ID: <20070731220553.GA29780@blade.az.mvista.com> References: <20070726222021.GA10427@blade.az.mvista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <20070726222021.GA10427@blade.az.mvista.com> Cc: linuxppc-dev@ozlabs.org, bluesmoke-devel@lists.sourceforge.net, norsk5@yahoo.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Publish the devices listed in dts under SOC as of_device just like what mpc85xx_mds platforms do. The 85xx cds and ads platforms currently do not export the devices in dts as of_device. I need the memory controller, L2 cache-controller, and the PCI controller published as of_device so the mpc85xx EDAC driver can claim them for usage. Signed-off-by: Dave Jiang --- Same as the earlier posted patch. Reposting to keep patch numbers consistent since there are 3 patches in the series now. arch/powerpc/platforms/85xx/mpc85xx_ads.c | 19 +++++++++++++++++++ arch/powerpc/platforms/85xx/mpc85xx_cds.c | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 40a8286..599d7f7 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c @@ -18,6 +18,8 @@ #include #include +#include +#include #include #include #include @@ -254,6 +256,23 @@ static int __init mpc85xx_ads_probe(void) return of_flat_dt_is_compatible(root, "MPC85xxADS"); } +static struct of_device_id mpc85xx_ids[] = { + { .type = "soc", }, + { .compatible = "soc", }, + {}, +}; + +static int __init mpc85xx_publish_devices(void) +{ + if (!machine_is(mpc85xx_ads)) + return 0; + + of_platform_bus_probe(NULL, mpc85xx_ids, NULL); + + return 0; +} +device_initcall(mpc85xx_publish_devices); + define_machine(mpc85xx_ads) { .name = "MPC85xx ADS", .probe = mpc85xx_ads_probe, diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 6a171e9..5294884 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c @@ -27,6 +27,8 @@ #include #include +#include +#include #include #include #include @@ -342,6 +344,23 @@ static int __init mpc85xx_cds_probe(void) return of_flat_dt_is_compatible(root, "MPC85xxCDS"); } +static struct of_device_id mpc85xx_ids[] = { + { .type = "soc", }, + { .compatible = "soc", }, + {}, +}; + +static int __init mpc85xx_publish_devices(void) +{ + if (!machine_is(mpc85xx_cds)) + return 0; + + of_platform_bus_probe(NULL, mpc85xx_ids, NULL); + + return 0; +} +device_initcall(mpc85xx_publish_devices); + define_machine(mpc85xx_cds) { .name = "MPC85xx CDS", .probe = mpc85xx_cds_probe,