From: Mugunthan V N <mugunthanvnm@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/9] drivers: nand: implement a NAND uclass
Date: Tue, 5 Apr 2016 13:57:08 +0530 [thread overview]
Message-ID: <570376DC.8060402@ti.com> (raw)
In-Reply-To: <1459553484.32510.54.camel@buserror.net>
Hi Scott
On Saturday 02 April 2016 05:01 AM, Scott Wood wrote:
> On Fri, 2016-04-01 at 18:25 -0500, Scott Wood wrote:
>> On Fri, 2016-04-01 at 16:59 +0530, Mugunthan V N wrote:
>>> +static int nand_child_pre_probe(struct udevice *dev)
>>> +{
>>> + nand_info_t *nand = dev_get_uclass_priv(dev);
>>> + void *priv = dev_get_priv(dev);
>>> +
>>> + /*
>>> + * Store nand device priv pointer in nand_info so that
>>> + * it can be used by nand command
>>> + */
>>> + nand->priv = priv;
>>
>> Wouldn't it make more sense to have a pointer to the device in the NAND
>> struct, and let the driver manage both privs as it chooses?
>
> This makes even less sense after seeing patch 5/9, which assumes dev priv is
> nand_info_t, and stores its own data in nand->priv. Won't this overwrite
> that?
This nand is not the same as in omap_gpmc driver priv nand, here nand
specifies nand_info_t which is "struct mtd_info" and in omap_gpmc driver
it is "struct nand_chip".
In class:
(nand_info_t) nand->priv = driver priv, ie nand_chip
In driver:
(nand_chip) nand->priv = struct omap_nand_info * (internal to driver)
So both are different and used for different purposes.
Regards
Mugunthan V N
next prev parent reply other threads:[~2016-04-05 8:27 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-01 11:29 [U-Boot] [PATCH 0/9] device model bringup of nand on am335x gp evm and am437x gp evm Mugunthan V N
2016-04-01 11:29 ` [U-Boot] [PATCH 1/9] include: nand: move endif to end of file Mugunthan V N
2016-04-01 12:51 ` Tom Rini
2016-04-20 14:39 ` Simon Glass
2016-04-01 11:29 ` [U-Boot] [PATCH 2/9] cmd: nand: abstract global variable usage for dm conversion Mugunthan V N
2016-04-01 12:51 ` Tom Rini
2016-04-01 22:57 ` Scott Wood
2016-04-13 11:01 ` Mugunthan V N
2016-04-14 11:50 ` Mugunthan V N
2016-04-01 11:29 ` [U-Boot] [PATCH 3/9] drivers: nand: Kconfig: add NAND as Kconfig option Mugunthan V N
2016-04-01 12:51 ` Tom Rini
2016-04-01 14:57 ` Mugunthan V N
2016-04-01 23:07 ` Scott Wood
2016-04-01 23:41 ` Tom Rini
2016-04-01 23:45 ` Scott Wood
2016-04-02 0:25 ` Tom Rini
2016-04-05 8:37 ` Mugunthan V N
2016-04-08 19:45 ` Tom Rini
2016-04-17 1:38 ` Scott Wood
2016-04-01 11:29 ` [U-Boot] [PATCH 4/9] drivers: nand: implement a NAND uclass Mugunthan V N
2016-04-01 12:51 ` Tom Rini
2016-04-01 14:59 ` Mugunthan V N
2016-04-01 23:25 ` Scott Wood
2016-04-01 23:31 ` Scott Wood
2016-04-05 8:27 ` Mugunthan V N [this message]
2016-04-20 14:39 ` Simon Glass
2016-04-21 5:55 ` Mugunthan V N
2016-04-21 14:11 ` Simon Glass
2016-04-22 5:06 ` Mugunthan V N
2016-04-01 11:29 ` [U-Boot] [PATCH 5/9] drivers: nand: omap_gpmc: convert driver to adopt driver model Mugunthan V N
2016-04-01 12:51 ` Tom Rini
2016-04-04 17:22 ` Scott Wood
2016-04-05 8:41 ` Mugunthan V N
2016-04-01 11:29 ` [U-Boot] [PATCH 6/9] am43xx_evm: nand: do not define DM_NAND for spl Mugunthan V N
2016-04-01 12:51 ` Tom Rini
2016-04-20 14:39 ` Simon Glass
2016-04-01 11:29 ` [U-Boot] [PATCH 7/9] defconfig: am437x_gp_evm: enable NAND driver model Mugunthan V N
2016-04-01 12:52 ` Tom Rini
2016-04-20 14:39 ` Simon Glass
2016-04-01 11:29 ` [U-Boot] [PATCH 8/9] am335x_evm: nand: do not define DM_NAND for spl Mugunthan V N
2016-04-01 12:52 ` Tom Rini
2016-04-20 14:39 ` Simon Glass
2016-04-01 11:29 ` [U-Boot] [PATCH 9/9] defconfig: am335x_gp_evm: enable NAND driver model Mugunthan V N
2016-04-20 14:39 ` Simon Glass
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=570376DC.8060402@ti.com \
--to=mugunthanvnm@ti.com \
--cc=u-boot@lists.denx.de \
/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