From: Samuel Ortiz <sameo@linux.intel.com>
To: "Manjunathappa, Prakash" <prakash.pm@ti.com>
Cc: davinci-linux-open-source@linux.davincidsp.com,
linux@arm.linux.org.uk, nsekhar@ti.com,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 2/3] arm:davinci: move emif driver to mfd framework
Date: Mon, 27 Feb 2012 15:26:38 +0100 [thread overview]
Message-ID: <20120227142638.GN27687@sortiz-mobl> (raw)
In-Reply-To: <1330005504-25321-3-git-send-email-prakash.pm@ti.com>
Hi Prakash,
On Thu, Feb 23, 2012 at 07:28:23PM +0530, Manjunathappa, Prakash wrote:
> +static int __init davinci_aemif_probe(struct platform_device *pdev)
> +{
> + struct davinci_aemif_devices *davinci_aemif_devices =
> + pdev->dev.platform_data;
> + struct platform_device *devices;
> + struct mfd_cell *cells;
> + int i, ret, count;
> +
> + devices = davinci_aemif_devices->devices;
> +
> + cells = kzalloc(sizeof(struct mfd_cell) *
> + davinci_aemif_devices->num_devices, GFP_KERNEL);
> +
> + for (i = 0, count = 0; i < davinci_aemif_devices->num_devices; i++) {
> + if (!strcmp(devices[i].name, "davinci_nand")) {
> + cells[count].pdata_size =
> + sizeof(struct davinci_nand_pdata);
> + } else if (!strcmp(devices[i].name, "physmap-flash")) {
> + cells[count].pdata_size =
> + sizeof(struct physmap_flash_data);
> + } else
> + continue;
> +
> + cells[count].name = devices[i].name;
> + cells[count].platform_data =
> + devices[i].dev.platform_data;
> + cells[count].id = devices[i].id;
> + cells[count].resources = devices[i].resource;
> + cells[count].num_resources = devices[i].num_resources;
> + count++;
> + }
So it seems you're passing a platform devices array through your mfd aemif
platform data pointer. And from what I can see, it's mostly a 1 entry array
(for the NAND case) or a 2 entries array (for the NAND and NOR case).
In that case, adding an MFD driver in the middle brings basically nothing but
confusion and overhead (and 200+ lines of code).
So unless someone explains to me how this is doing any good to the kernel in
general, I'm not going to take this patchset.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
next prev parent reply other threads:[~2012-02-27 14:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 13:58 [PATCH v5 2/3] arm:davinci: move emif driver to mfd framework Manjunathappa, Prakash
2012-02-27 14:26 ` Samuel Ortiz [this message]
2012-02-28 5:44 ` Manjunathappa, Prakash
2012-02-29 7:01 ` Manjunathappa, Prakash
2012-03-01 11:23 ` Samuel Ortiz
2012-03-06 13:12 ` Manjunathappa, Prakash
2012-03-16 17:29 ` Samuel Ortiz
2012-03-20 12:57 ` Manjunathappa, Prakash
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=20120227142638.GN27687@sortiz-mobl \
--to=sameo@linux.intel.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=dwmw2@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=nsekhar@ti.com \
--cc=prakash.pm@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox