linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] drivers: mtd: add Samsung SoC OneNAND driver
Date: Tue, 27 Apr 2010 09:30:29 +0200	[thread overview]
Message-ID: <001201cae5db$85f1df20$91d59d60$%szyprowski@samsung.com> (raw)
In-Reply-To: <20100427051916.GI6684@trinity.fluff.org>

Hello,

On Tuesday, April 27, 2010 7:19 AM Ben Dooks wrote:

> ...

> > +static int s3c_read_reg(int offset)
> > +{
> > +	return readl(onenand->base + offset);
> > +}
> > +
> > +static void s3c_write_reg(int value, int offset)
> > +{
> > +	writel(value, onenand->base + offset);
> > +}
> 
> I can sort of see why you've done this, it would be interesting to see
> if the compiler is continually reloading onenand->base or not (currently
> too lazy to try this myself).

I will check this, but probably changing these functions to 'static inline' 
would solve the problem for sure.

> ...

> > +	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	if (!r) {
> > +		dev_err(&pdev->dev, "no resource defined\n");
> > +		return -ENXIO;
> 
> If i rember correctly, -ENXIO will make the driver layer fail to report
> any binding issue. However there seems to be a group of people who feel
> that using filesystem errors such as -ENOENT inappropriate for drivers...
> 
> Not sure what to recommend here, maybe just leave as is.

I will change it to -ENOENT. Most the drivers returns it if get_resource()
fails. I don't think that this really matters anyway...

> ...

> > +static int __init s3c_onenand_init(void)
> > +{
> > +	return platform_driver_register(&s3c_onenand_driver);
> > +}
> > +
> > +static void __exit s3c_onenand_exit(void)
> > +{
> > +	platform_driver_unregister(&s3c_onenand_driver);
> > +}
> > +
> > +module_init(s3c_onenand_init);
> > +module_exit(s3c_onenand_exit);
> > +
> > +MODULE_LICENSE("GPL");
> > +MODULE_AUTHOR("Kyungmin Park <kyungmin.park@samsung.com>");
> > +MODULE_DESCRIPTION("Samsung OneNAND controller support");
> > +MODULE_ALIAS("platform:samsung-onenand");
> 
> don't think you need a MODULE_ALIAS when you have a MODULE_DEVICE_TABLE
> decleration, the module tools should support reading this table for use
> with the autoloader.

Ok. Thanks for your hints.

> Don't see any show stopping problems with this. It would be nice to
> sort out as many of the issues raised before final submission.

I will do all required cleanup and send the new patch series soon. Thanks for
your detailed review.

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

  reply	other threads:[~2010-04-27  7:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09  6:57 [PATCH] Add support for Samsung SoC OneNAND controllers Marek Szyprowski
2010-04-09  6:57 ` [PATCH 1/5] drivers: mtd: onenand: add support for chips with 4KB page size Marek Szyprowski
2010-04-09  6:57 ` [PATCH 2/5] drivers: mtd: onenand: add allocation of the verify buffer Marek Szyprowski
2010-04-09  6:57 ` [PATCH 3/5] drivers: mtd: onenand: add new callback for bufferram read Marek Szyprowski
2010-04-09  6:57 ` [PATCH 4/5] drivers: mtd: onenand: add workaround for SYNC_WRITE mode Marek Szyprowski
2010-04-09  6:57 ` [PATCH 5/5] drivers: mtd: add Samsung SoC OneNAND driver Marek Szyprowski
2010-04-27  5:19   ` Ben Dooks
2010-04-27  7:30     ` Marek Szyprowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-04-28 15:46 [PATCH v2] Add support for Samsung SoC OneNAND controllers Marek Szyprowski
2010-04-28 15:46 ` [PATCH 5/5] drivers: mtd: add Samsung SoC OneNAND driver Marek Szyprowski

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='001201cae5db$85f1df20$91d59d60$%szyprowski@samsung.com' \
    --to=m.szyprowski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).