Thread (102 messages) 102 messages, 6 authors, 2011-03-01
STALE5566d

[PATCH V5 36/63] ST SPEAr : EMI (Extrenal Memory Interface) controller driver

From: Russell King - ARM Linux <hidden>
Date: 2011-02-21 11:02:33

On Mon, Feb 21, 2011 at 11:56:10AM +0530, Vipin Kumar wrote:
quoted
quoted
+void __init
+emi_init_board_info(struct platform_device *pdev, struct resource *resources,
+		int res_num, struct mtd_partition *partitions,
+		unsigned int nr_partitions, unsigned int width)
+{
+	struct physmap_flash_data *emi_plat_data = dev_get_platdata(&pdev->dev);
+
+	pdev->resource = resources;
+	pdev->num_resources = res_num;
+
+	if (partitions) {
+		emi_plat_data->parts = partitions;
+		emi_plat_data->nr_parts = nr_partitions;
+	}
+
+	emi_plat_data->width = width;
+}
I don't see why this has to be code rather than in the platform specific
files as static initializers.  
The device is instantiated in the machine file and above information comes
from the board file. So we kept them this way.
Ok, but I don't see why this should be in the EMI code.  Surely this
should be along side the nor device, and called 'nor_init_board_info'
or something similar?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help