From: computersforpeace@gmail.com (Brian Norris)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 07/12] mtd: nand: add Samsung K9GBG08U0A-M to nand_ids table
Date: Mon, 20 Jul 2015 11:08:47 -0700 [thread overview]
Message-ID: <20150720180847.GH24125@google.com> (raw)
In-Reply-To: <55621B83.4040909@vanguardiasur.com.ar>
Hi Ezequiel,
On Sun, May 24, 2015 at 03:42:11PM -0300, Ezequiel Garcia wrote:
> On 05/20/2015 11:43 AM, Antoine Tenart wrote:
> [..]
> >>
> >> I just had a look on the datasheet, and I you're right, the nand should
> >> support JDEC. However I get a "No NAND device found" error when
> >> reverting this patch.
> >>
> >> It seems nand_flash_detect_jedec() is not reading "JDEC" and is returning
> >> directly. I'm having a look at this.
> >
> > So, I can read 'J', 'E', 'D' and 'E' but then I got 0xff's. So I tried
> > to only check of JEDE in nand_flash_detect_jedec() but the JEDEC
> > parameter page was then not valid.
> >
>
> This uncovers two different bugs in the driver.
>
> 1. read_id_bytes is either '2' or '4', but JEDEC detections needs at
> least 5 bytes.
>
> 2. The initial buffer (to read the ID and the parameter page) has
> 256 bytes, but the JEDEC parameter page is 512-bytes.
>
> And while at it, the driver doesn't seem to support reading the
> redundant parameter pages (recently reported on barebox ML [1]). So this
> is a third bug.
>
> Would you try setting read_id_bytes to '5' and also increasing the READ_PARAM
> transfer length? Something like this:
I'm trying to parse through the latest pxa3xx_nand patches, and I'm a
bit lost. Did this piece get dropped on the floor?
At any rate, it looks like there are a few more things to fix in
Antoine's latest work, so I can't quite take them. Correct me if I'm
misunderstanding.
Thanks,
Brian
> diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
> index 1259cc5..851372f 100644
> --- a/drivers/mtd/nand/pxa3xx_nand.c
> +++ b/drivers/mtd/nand/pxa3xx_nand.c
> @@ -48,7 +48,7 @@
> * STATUS, READID and PARAM. The largest of these is the PARAM command,
> * needing 256 bytes.
> */
> -#define INIT_BUFFER_SIZE 256
> +#define INIT_BUFFER_SIZE 2048
>
> /* registers and bit definitions */
> #define NDCR (0x00) /* Control register */
> @@ -899,18 +899,18 @@ static int prepare_set_command(struct pxa3xx_nand_info *info, int command,
> break;
>
> case NAND_CMD_PARAM:
> - info->buf_count = 256;
> + info->buf_count = 2048;
> info->ndcb0 |= NDCB0_CMD_TYPE(0)
> | NDCB0_ADDR_CYC(1)
> | NDCB0_LEN_OVRD
> | command;
> info->ndcb1 = (column & 0xFF);
> - info->ndcb3 = 256;
> - info->data_size = 256;
> + info->ndcb3 = 2048;
> + info->data_size = 2048;
> break;
>
> [1] http://lists.infradead.org/pipermail/barebox/2015-May/023515.html
>
next prev parent reply other threads:[~2015-07-20 18:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 14:58 [PATCH v5 00/12] ARM: berlin: add nand support Antoine Tenart
2015-05-11 14:58 ` [PATCH v5 01/12] mtd: pxa3xx_nand: add a non mandatory ECC clock Antoine Tenart
2015-05-11 14:58 ` [PATCH v5 02/12] Documentation: bindings: document the clocks for pxa3xx-nand Antoine Tenart
2015-05-11 14:58 ` [PATCH v5 03/12] mtd: pxa3xx_nand: add a default chunk size Antoine Tenart
2015-05-11 14:58 ` [PATCH v5 04/12] mtd: pxa3xx_nand: add helpers to setup the timings Antoine Tenart
2015-05-11 14:58 ` [PATCH v5 05/12] mtd: pxa3xx_nand: rework flash detection and timing setup Antoine Tenart
2015-05-11 22:10 ` Ezequiel Garcia
2015-05-12 14:39 ` Antoine Tenart
2015-05-16 21:23 ` Ezequiel Garcia
2015-05-20 13:55 ` Antoine Tenart
2015-05-20 13:56 ` Ezequiel Garcia
2015-05-20 14:04 ` Antoine Tenart
2015-05-16 22:02 ` Ezequiel Garcia
2015-05-20 14:03 ` Antoine Tenart
2015-05-20 14:05 ` Ezequiel Garcia
2015-05-11 14:58 ` [PATCH v5 06/12] mtd: pxa3xx_nand: clean up the pxa3xx timings Antoine Tenart
2015-05-11 14:58 ` [PATCH v5 07/12] mtd: nand: add Samsung K9GBG08U0A-M to nand_ids table Antoine Tenart
2015-05-16 18:57 ` Ezequiel Garcia
2015-05-20 14:06 ` Antoine Tenart
2015-05-20 14:09 ` Ezequiel Garcia
2015-05-20 14:24 ` Antoine Tenart
2015-05-20 14:43 ` Antoine Tenart
2015-05-24 18:42 ` Ezequiel Garcia
2015-07-20 18:08 ` Brian Norris [this message]
2015-07-20 18:22 ` Ezequiel Garcia
2015-05-11 14:58 ` [PATCH v5 08/12] mtd: pxa3xx_nand: add support for the Marvell Berlin nand controller Antoine Tenart
2015-05-11 14:58 ` [PATCH v5 09/12] Documentation: bindings: add the Berlin nand controller compatible Antoine Tenart
2015-05-11 14:58 ` [PATCH v5 10/12] mtd: nand: let Marvell Berlin SoCs select the pxa3xx driver Antoine Tenart
2015-05-11 14:59 ` [PATCH v5 11/12] ARM: berlin: add BG2Q node for the nand Antoine Tenart
2015-05-11 14:59 ` [PATCH v5 12/12] ARM: berlin: enable flash on the BG2Q DMP Antoine Tenart
2015-05-16 21:37 ` [PATCH v5 00/12] ARM: berlin: add nand support Ezequiel Garcia
2015-05-20 14:08 ` Antoine Tenart
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=20150720180847.GH24125@google.com \
--to=computersforpeace@gmail.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).