From: Varka Bhadram <varkabhadram@gmail.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
linux-kernel@vger.kernel.org,
Yassin Jaffer <yassinjaffer@gmail.com>,
linux-sunxi@googlegroups.com, Rob Herring <robh+dt@kernel.org>,
Kumar Gala <galak@codeaurora.org>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 1/2] mtd: nand: add sunxi NAND flash controller support
Date: Mon, 20 Oct 2014 17:31:51 +0530 [thread overview]
Message-ID: <5444F9AF.5000104@gmail.com> (raw)
In-Reply-To: <1413805520-14947-2-git-send-email-boris.brezillon@free-electrons.com>
On 10/20/2014 05:15 PM, Boris Brezillon wrote:
> Add support for the sunxi NAND Flash Controller (NFC).
>
(...)
> +
> +static int sunxi_nfc_dev_ready(struct mtd_info *mtd)
> +{
> + struct nand_chip *nand = mtd->priv;
> + struct sunxi_nand_chip *sunxi_nand = to_sunxi_nand(nand);
> + struct sunxi_nfc *nfc = to_sunxi_nfc(sunxi_nand->nand.controller);
> + struct sunxi_nand_rb *rb;
> + unsigned long timeo = (sunxi_nand->nand.state == FL_ERASING ? 400 : 20);
> + int ret;
> +
> + if (sunxi_nand->selected < 0)
> + return 0;
> +
> + rb = &sunxi_nand->sels[sunxi_nand->selected].rb;
> +
> + switch (rb->type) {
> + case RB_NATIVE:
> + ret = !!(readl(nfc->regs + NFC_REG_ST) &
> + (NFC_RB_STATE0 << rb->info.nativeid));
> + if (ret)
> + break;
> +
> + sunxi_nfc_wait_int(nfc, NFC_RB_B2R, timeo);
> + ret = !!(readl(nfc->regs + NFC_REG_ST) &
> + (NFC_RB_STATE0 << rb->info.nativeid));
> + break;
> + case RB_GPIO:
> + ret = gpio_get_value(rb->info.gpio);
> + break;
> + case RB_NONE:
> + default:
> + ret = 0;
> + pr_err("cannot check R/B NAND status!");
Missed terminating new line... :-)
> + break;
> + }
> +
> + return ret;
> +}
> +
> +
(...)
> +static struct platform_driver sunxi_nfc_driver = {
> + .driver = {
> + .name = "sunxi_nand",
> + .owner = THIS_MODULE,
This field updated by module_platform_driver()..
> + .of_match_table = sunxi_nfc_ids,
> + },
> + .probe = sunxi_nfc_probe,
> + .remove = sunxi_nfc_remove,
> +};
> +module_platform_driver(sunxi_nfc_driver);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Boris BREZILLON");
> +MODULE_DESCRIPTION("Allwinner NAND Flash Controller driver");
> +MODULE_ALIAS("platform:sunxi_nand");
--
Regards,
Varka Bhadram.
WARNING: multiple messages have this Message-ID (diff)
From: varkabhadram@gmail.com (Varka Bhadram)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/2] mtd: nand: add sunxi NAND flash controller support
Date: Mon, 20 Oct 2014 17:31:51 +0530 [thread overview]
Message-ID: <5444F9AF.5000104@gmail.com> (raw)
In-Reply-To: <1413805520-14947-2-git-send-email-boris.brezillon@free-electrons.com>
On 10/20/2014 05:15 PM, Boris Brezillon wrote:
> Add support for the sunxi NAND Flash Controller (NFC).
>
(...)
> +
> +static int sunxi_nfc_dev_ready(struct mtd_info *mtd)
> +{
> + struct nand_chip *nand = mtd->priv;
> + struct sunxi_nand_chip *sunxi_nand = to_sunxi_nand(nand);
> + struct sunxi_nfc *nfc = to_sunxi_nfc(sunxi_nand->nand.controller);
> + struct sunxi_nand_rb *rb;
> + unsigned long timeo = (sunxi_nand->nand.state == FL_ERASING ? 400 : 20);
> + int ret;
> +
> + if (sunxi_nand->selected < 0)
> + return 0;
> +
> + rb = &sunxi_nand->sels[sunxi_nand->selected].rb;
> +
> + switch (rb->type) {
> + case RB_NATIVE:
> + ret = !!(readl(nfc->regs + NFC_REG_ST) &
> + (NFC_RB_STATE0 << rb->info.nativeid));
> + if (ret)
> + break;
> +
> + sunxi_nfc_wait_int(nfc, NFC_RB_B2R, timeo);
> + ret = !!(readl(nfc->regs + NFC_REG_ST) &
> + (NFC_RB_STATE0 << rb->info.nativeid));
> + break;
> + case RB_GPIO:
> + ret = gpio_get_value(rb->info.gpio);
> + break;
> + case RB_NONE:
> + default:
> + ret = 0;
> + pr_err("cannot check R/B NAND status!");
Missed terminating new line... :-)
> + break;
> + }
> +
> + return ret;
> +}
> +
> +
(...)
> +static struct platform_driver sunxi_nfc_driver = {
> + .driver = {
> + .name = "sunxi_nand",
> + .owner = THIS_MODULE,
This field updated by module_platform_driver()..
> + .of_match_table = sunxi_nfc_ids,
> + },
> + .probe = sunxi_nfc_probe,
> + .remove = sunxi_nfc_remove,
> +};
> +module_platform_driver(sunxi_nfc_driver);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Boris BREZILLON");
> +MODULE_DESCRIPTION("Allwinner NAND Flash Controller driver");
> +MODULE_ALIAS("platform:sunxi_nand");
--
Regards,
Varka Bhadram.
WARNING: multiple messages have this Message-ID (diff)
From: Varka Bhadram <varkabhadram-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Boris Brezillon
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Brian Norris
<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Yassin Jaffer
<yassinjaffer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Subject: Re: [PATCH v6 1/2] mtd: nand: add sunxi NAND flash controller support
Date: Mon, 20 Oct 2014 17:31:51 +0530 [thread overview]
Message-ID: <5444F9AF.5000104@gmail.com> (raw)
In-Reply-To: <1413805520-14947-2-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
On 10/20/2014 05:15 PM, Boris Brezillon wrote:
> Add support for the sunxi NAND Flash Controller (NFC).
>
(...)
> +
> +static int sunxi_nfc_dev_ready(struct mtd_info *mtd)
> +{
> + struct nand_chip *nand = mtd->priv;
> + struct sunxi_nand_chip *sunxi_nand = to_sunxi_nand(nand);
> + struct sunxi_nfc *nfc = to_sunxi_nfc(sunxi_nand->nand.controller);
> + struct sunxi_nand_rb *rb;
> + unsigned long timeo = (sunxi_nand->nand.state == FL_ERASING ? 400 : 20);
> + int ret;
> +
> + if (sunxi_nand->selected < 0)
> + return 0;
> +
> + rb = &sunxi_nand->sels[sunxi_nand->selected].rb;
> +
> + switch (rb->type) {
> + case RB_NATIVE:
> + ret = !!(readl(nfc->regs + NFC_REG_ST) &
> + (NFC_RB_STATE0 << rb->info.nativeid));
> + if (ret)
> + break;
> +
> + sunxi_nfc_wait_int(nfc, NFC_RB_B2R, timeo);
> + ret = !!(readl(nfc->regs + NFC_REG_ST) &
> + (NFC_RB_STATE0 << rb->info.nativeid));
> + break;
> + case RB_GPIO:
> + ret = gpio_get_value(rb->info.gpio);
> + break;
> + case RB_NONE:
> + default:
> + ret = 0;
> + pr_err("cannot check R/B NAND status!");
Missed terminating new line... :-)
> + break;
> + }
> +
> + return ret;
> +}
> +
> +
(...)
> +static struct platform_driver sunxi_nfc_driver = {
> + .driver = {
> + .name = "sunxi_nand",
> + .owner = THIS_MODULE,
This field updated by module_platform_driver()..
> + .of_match_table = sunxi_nfc_ids,
> + },
> + .probe = sunxi_nfc_probe,
> + .remove = sunxi_nfc_remove,
> +};
> +module_platform_driver(sunxi_nfc_driver);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Boris BREZILLON");
> +MODULE_DESCRIPTION("Allwinner NAND Flash Controller driver");
> +MODULE_ALIAS("platform:sunxi_nand");
--
Regards,
Varka Bhadram.
WARNING: multiple messages have this Message-ID (diff)
From: Varka Bhadram <varkabhadram@gmail.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
devicetree@vger.kernel.org, linux-sunxi@googlegroups.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Yassin Jaffer <yassinjaffer@gmail.com>,
Maxime Ripard <maxime.ripard@free-electrons.com>
Subject: Re: [PATCH v6 1/2] mtd: nand: add sunxi NAND flash controller support
Date: Mon, 20 Oct 2014 17:31:51 +0530 [thread overview]
Message-ID: <5444F9AF.5000104@gmail.com> (raw)
In-Reply-To: <1413805520-14947-2-git-send-email-boris.brezillon@free-electrons.com>
On 10/20/2014 05:15 PM, Boris Brezillon wrote:
> Add support for the sunxi NAND Flash Controller (NFC).
>
(...)
> +
> +static int sunxi_nfc_dev_ready(struct mtd_info *mtd)
> +{
> + struct nand_chip *nand = mtd->priv;
> + struct sunxi_nand_chip *sunxi_nand = to_sunxi_nand(nand);
> + struct sunxi_nfc *nfc = to_sunxi_nfc(sunxi_nand->nand.controller);
> + struct sunxi_nand_rb *rb;
> + unsigned long timeo = (sunxi_nand->nand.state == FL_ERASING ? 400 : 20);
> + int ret;
> +
> + if (sunxi_nand->selected < 0)
> + return 0;
> +
> + rb = &sunxi_nand->sels[sunxi_nand->selected].rb;
> +
> + switch (rb->type) {
> + case RB_NATIVE:
> + ret = !!(readl(nfc->regs + NFC_REG_ST) &
> + (NFC_RB_STATE0 << rb->info.nativeid));
> + if (ret)
> + break;
> +
> + sunxi_nfc_wait_int(nfc, NFC_RB_B2R, timeo);
> + ret = !!(readl(nfc->regs + NFC_REG_ST) &
> + (NFC_RB_STATE0 << rb->info.nativeid));
> + break;
> + case RB_GPIO:
> + ret = gpio_get_value(rb->info.gpio);
> + break;
> + case RB_NONE:
> + default:
> + ret = 0;
> + pr_err("cannot check R/B NAND status!");
Missed terminating new line... :-)
> + break;
> + }
> +
> + return ret;
> +}
> +
> +
(...)
> +static struct platform_driver sunxi_nfc_driver = {
> + .driver = {
> + .name = "sunxi_nand",
> + .owner = THIS_MODULE,
This field updated by module_platform_driver()..
> + .of_match_table = sunxi_nfc_ids,
> + },
> + .probe = sunxi_nfc_probe,
> + .remove = sunxi_nfc_remove,
> +};
> +module_platform_driver(sunxi_nfc_driver);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Boris BREZILLON");
> +MODULE_DESCRIPTION("Allwinner NAND Flash Controller driver");
> +MODULE_ALIAS("platform:sunxi_nand");
--
Regards,
Varka Bhadram.
next prev parent reply other threads:[~2014-10-20 12:01 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 11:45 [PATCH v6 0/2] mtd: nand: add sunxi NAND flash controller support Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-20 11:45 ` [PATCH v6 1/2] " Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-20 12:01 ` Varka Bhadram [this message]
2014-10-20 12:01 ` Varka Bhadram
2014-10-20 12:01 ` Varka Bhadram
2014-10-20 12:01 ` Varka Bhadram
2014-10-20 12:29 ` Boris Brezillon
2014-10-20 12:29 ` Boris Brezillon
2014-10-20 12:29 ` Boris Brezillon
2014-10-20 12:29 ` Boris Brezillon
2014-10-21 2:28 ` Brian Norris
2014-10-21 2:28 ` Brian Norris
2014-10-21 2:28 ` Brian Norris
2014-10-21 2:28 ` Brian Norris
2014-10-20 11:45 ` [PATCH v6 2/2] mtd: nand: add sunxi NFC dt bindings doc Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-20 11:45 ` Boris Brezillon
2014-10-21 2:41 ` Brian Norris
2014-10-21 2:41 ` Brian Norris
2014-10-21 2:41 ` Brian Norris
2014-10-21 2:41 ` Brian Norris
2014-10-21 12:53 ` Boris Brezillon
2014-10-21 12:53 ` Boris Brezillon
2014-10-21 12:53 ` Boris Brezillon
2014-10-21 12:53 ` Boris Brezillon
2014-10-21 13:13 ` Ezaul Zillmer
[not found] ` <62d54110-9c7f-4342-9201-a1ae23194620-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-10-21 13:15 ` Ezaul Zillmer
2014-10-21 13:48 ` Boris Brezillon
2014-10-21 13:48 ` Boris Brezillon
2014-10-21 13:48 ` Boris Brezillon
2014-10-21 13:58 ` Boris Brezillon
2014-10-21 13:58 ` Boris Brezillon
2014-10-21 13:58 ` Boris Brezillon
2014-10-21 13:58 ` Boris Brezillon
2014-10-21 15:03 ` Ezaul Zillmer
[not found] ` <89bb5f8e-2fb0-4012-a8b2-fdd618da8f11-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-10-21 15:46 ` Ezaul Zillmer
2014-10-21 16:01 ` Boris Brezillon
2014-10-21 16:01 ` Boris Brezillon
2014-10-21 16:01 ` Boris Brezillon
2014-10-21 16:01 ` Boris Brezillon
2014-10-22 11:17 ` Ezaul Zillmer
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=5444F9AF.5000104@gmail.com \
--to=varkabhadram@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=yassinjaffer@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.