From patchwork Tue Aug 23 05:03:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manjugk manjugk X-Patchwork-Id: 1087112 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7N4jfIE014386 for ; Tue, 23 Aug 2011 04:45:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751502Ab1HWEpw (ORCPT ); Tue, 23 Aug 2011 00:45:52 -0400 Received: from [117.192.64.96] ([117.192.64.96]:40902 "EHLO manju-desktop" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750945Ab1HWEpw (ORCPT ); Tue, 23 Aug 2011 00:45:52 -0400 To: devicetree-discuss@lists.ozlabs.org Date: Tue, 23 Aug 2011 10:03:30 +0500 Subject: [RFC/PATCH v2 02/13] dt: Add pd_size to AUXDATA structure Envelope-To: devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, grant.likely@secretlab.ca References: <1314074021-25186-1-git-send-email-manjugk@ti.com> CC: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, grant.likely@secretlab.ca Message-ID: <1314074021-25186-3-git-send-email-manjugk@ti.com> From: "G, Manjunath Kondaiah" Received: from manju-desktop (Citadel from userid 1000) by manju-desktop; Tue, 23 Aug 2011 10:03:42 +0500 X-Mailer: git-send-email 1.7.4.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 23 Aug 2011 04:45:53 +0000 (UTC) Add pd_size in the AUXDATA structure so that omap HWMOD which require platform_data size can pass along with AUXDATA. Signed-off-by: G, Manjunath Kondaiah --- drivers/of/platform.c | 2 ++ include/linux/of_platform.h | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index b030fd5..e50ffcb 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -565,6 +565,7 @@ static int of_platform_bus_create(struct device_node *bus, struct platform_device *dev; const char *bus_id = NULL; void *platform_data = NULL; + int pd_size; int id = -1; int rc = 0; @@ -588,6 +589,7 @@ static int of_platform_bus_create(struct device_node *bus, bus_id = auxdata->name; id = auxdata->id; platform_data = auxdata->platform_data; + pd_size = auxdata->pd_size; } if (of_device_is_compatible(bus, "arm,primecell")) { diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 252246c..a3be980 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -47,6 +47,7 @@ struct of_dev_auxdata { char *name; int id; void *platform_data; + int pd_size; }; /* Macro to simplify populating a lookup table */ @@ -58,6 +59,10 @@ struct of_dev_auxdata { { .compatible = _compat, .phys_addr = _phys, .name = _name, \ .id = _id, .platform_data = _pdata } +#define OF_DEV_AUXDATA_ID_PDSIZE(_compat,_phys,_name,_id,_pdata,_pd_size) \ + { .compatible = _compat, .phys_addr = _phys, .name = _name, \ + .id = _id, .platform_data = _pdata, .pd_size = _pd_size } + /** * of_platform_driver - Legacy of-aware driver for platform devices. *