From: Grant Likely <grant.likely@secretlab.ca>
To: Anatolij Gustschin <agust@denx.de>
Cc: wd@denx.de, dzu@denx.de, linuxppc-dev@ozlabs.org,
linux-mtd@lists.infradead.org, Piotr Ziecik <kosmo@semihalf.com>
Subject: Re: [PATCH 3/8 v2] mtd: Add MPC5121 NAND Flash Controller driver
Date: Wed, 27 Jan 2010 09:43:56 -0700 [thread overview]
Message-ID: <fa686aa41001270843u3b4e9687k699ad579de4460d4@mail.gmail.com> (raw)
In-Reply-To: <1264594052-20317-4-git-send-email-agust@denx.de>
On Wed, Jan 27, 2010 at 5:07 AM, Anatolij Gustschin <agust@denx.de> wrote:
> From: Piotr Ziecik <kosmo@semihalf.com>
Again, it is appropriate for you to claim patch ownership now as long
as you preserve the signed-off-by history.
>
> Adds NAND Flash Controller driver for MPC5121 Revision 2.
> All device features, except hardware ECC and power management,
> are supported.
A few comments below.
> diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/=
platforms/512x/mpc512x_shared.c
> index 4745028..6b8314c 100644
> --- a/arch/powerpc/platforms/512x/mpc512x_shared.c
> +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
> @@ -82,6 +82,7 @@ void __init mpc512x_init_IRQ(void)
> =A0static struct of_device_id __initdata of_bus_ids[] =3D {
> =A0 =A0 =A0 =A0{ .compatible =3D "fsl,mpc5121-immr", },
> =A0 =A0 =A0 =A0{ .compatible =3D "fsl,mpc5121-localbus", },
> + =A0 =A0 =A0 { .compatible =3D "fsl,mpc5121-nfc", },
> =A0 =A0 =A0 =A0{},
> =A0};
This hunk shouldn't be in this patch since it touches arch code. Keep
the NAND and arch bits in separate patches.
Also, this is probably not what you really want. Doing it this way
means that each of the child nodes also get registered as of_platform
devices. You want the platform code to only register the nfc@40000000
node.
> +static int __init mpc5121_nfc_probe(struct of_device *op,
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 const struct of_device_id *match)
__devinit
> +{
> + =A0 =A0 =A0 struct device_node *rootnode, *dn =3D op->node;
> + =A0 =A0 =A0 struct device *dev =3D &op->dev;
> + =A0 =A0 =A0 struct mpc5121_nfc_prv *prv;
> + =A0 =A0 =A0 struct resource res;
> + =A0 =A0 =A0 struct mtd_info *mtd;
> +#ifdef CONFIG_MTD_PARTITIONS
> + =A0 =A0 =A0 struct mtd_partition *parts;
> +#endif
> + =A0 =A0 =A0 struct nand_chip *chip;
> + =A0 =A0 =A0 unsigned long regs_paddr, regs_size;
> + =A0 =A0 =A0 const uint *chips_no;
> + =A0 =A0 =A0 int resettime =3D 0;
> + =A0 =A0 =A0 int retval =3D 0;
> + =A0 =A0 =A0 int rev, len;
> +
> + =A0 =A0 =A0 /*
> + =A0 =A0 =A0 =A0* Check SoC revision. This driver supports only NFC
> + =A0 =A0 =A0 =A0* in MPC5121 revision 2.
> + =A0 =A0 =A0 =A0*/
> + =A0 =A0 =A0 rev =3D (mfspr(SPRN_SVR) >> 4) & 0xF;
> + =A0 =A0 =A0 if (rev !=3D 2) {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 dev_err(dev, "SoC revision %u is not suppor=
ted!\n", rev);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENXIO;
> + =A0 =A0 =A0 }
*Only* revision 2? Are future revisions of silicon assumed to be broken th=
en?
> +static int __exit mpc5121_nfc_remove(struct of_device *op)
__devexit
> +static struct of_device_id mpc5121_nfc_match[] =3D {
...match[] __devinitdata =3D {
> + =A0 =A0 =A0 { .compatible =3D "fsl,mpc5121-nfc", },
> + =A0 =A0 =A0 {},
> +};
> +
> +static struct of_platform_driver mpc5121_nfc_driver =3D {
> + =A0 =A0 =A0 .match_table =A0 =A0=3D mpc5121_nfc_match,
> + =A0 =A0 =A0 .probe =A0 =A0 =A0 =A0 =A0=3D mpc5121_nfc_probe,
> + =A0 =A0 =A0 .remove =A0 =A0 =A0 =A0 =3D __exit_p(mpc5121_nfc_remove),
__devexit_p()
g.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2010-01-27 16:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 12:07 [PATCH 0/8] Update support for MPC512x Anatolij Gustschin
2010-01-27 12:07 ` [PATCH 1/8 v2] powerpc/mpc5121: Add machine restart support Anatolij Gustschin
2010-01-27 15:46 ` Grant Likely
2010-01-27 12:07 ` [PATCH 2/8 v2] rtc: Add MPC5121 Real time clock driver Anatolij Gustschin
2010-01-27 15:58 ` Grant Likely
2010-01-27 12:07 ` [PATCH 3/8 v2] mtd: Add MPC5121 NAND Flash Controller driver Anatolij Gustschin
2010-01-27 16:43 ` Grant Likely [this message]
2010-01-27 20:24 ` Wolfgang Denk
2010-01-27 12:07 ` [PATCH 4/8 v2] dma: Add MPC512x DMA driver Anatolij Gustschin
2010-01-27 12:07 ` [PATCH 5/8 v2] powerpc/mpc5121: add USB host support Anatolij Gustschin
2010-01-27 12:36 ` Jan Andersson
2010-01-27 15:45 ` Anatolij Gustschin
2010-01-27 16:54 ` Grant Likely
2010-01-27 12:07 ` [PATCH 6/8 v2] powerpc/mpc5121: shared DIU framebuffer support Anatolij Gustschin
2010-01-27 12:07 ` [PATCH 7/8 v2] powerpc/mpc5121: update mpc5121ads DTS Anatolij Gustschin
2010-01-27 12:07 ` [PATCH 8/8 v2] powerpc/mpc5121: Add default config for MPC5121 Anatolij Gustschin
2010-01-27 14:23 ` [PATCH 0/8] Update support for MPC512x Anatolij Gustschin
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=fa686aa41001270843u3b4e9687k699ad579de4460d4@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=agust@denx.de \
--cc=dzu@denx.de \
--cc=kosmo@semihalf.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=wd@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;
as well as URLs for NNTP newsgroup(s).