@@ -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")) {
@@ -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.
*
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 <manjugk@ti.com> --- drivers/of/platform.c | 2 ++ include/linux/of_platform.h | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-)