All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3
@ 2012-12-12 18:49 Schneider, Roman
  2013-01-15  8:09 ` Artem Bityutskiy
  0 siblings, 1 reply; 7+ messages in thread
From: Schneider, Roman @ 2012-12-12 18:49 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org

       
       ---
       
       NFC v3 (e.g. mx53) does also require to compress the id in case of 16Bit busw.
       
        drivers/mtd/nand/mxc_nand.c |   11 +++++++++++
        1 files changed, 11 insertions(+), 0 deletions(-)
       
       diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
       index 72e31d8..7758897 100644
       --- a/drivers/mtd/nand/mxc_nand.c
       +++ b/drivers/mtd/nand/mxc_nand.c
       @@ -535,12 +535,23 @@ static void send_page_v1(struct mtd_info *mtd, unsigned int ops)
        
        static void send_read_id_v3(struct mxc_nand_host *host)
        {
       +	struct nand_chip *this = &host->nand;
       +
        	/* Read ID into main buffer */
        	writel(NFC_ID, NFC_V3_LAUNCH);
        
        	wait_op_done(host, true);
        
        	memcpy32_fromio(host->data_buf, host->main_area0, 16);
       +
       +	if (this->options & NAND_BUSWIDTH_16) {
       +		/* compress the ID info */
       +		host->data_buf[1] = host->data_buf[2];
       +		host->data_buf[2] = host->data_buf[4];
       +		host->data_buf[3] = host->data_buf[6];
       +		host->data_buf[4] = host->data_buf[8];
       +		host->data_buf[5] = host->data_buf[10];
       +	}
        }
        
        /* Request the NANDFC to perform a read of the NAND device ID. */
       -- 
       1.7.2.5
       


Development Control Systems
Festo Gesellschaft m.b.H.
Linzer Strasse 227
Austria - 1140 Wien

Firmenbuch Wien
FN 38435y
UID: ATU14650108

Tel: +43(1)91075-372
Fax: +43(1)91075-282
www.festo.at

Der Inhalt dieses E-Mails ist ausschliesslich fuer den bezeichneten Adressaten bestimmt. Jede Form der Kenntnisnahme,
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieses E-Mails durch unberechtigte Dritte ist unzulaessig. Wir
bitten Sie, sich mit dem Absender des E-Mails in Verbindung zu setzen, falls Sie nicht der Adressat dieses E-Mails sind und das
Material von Ihrem Computer zu loeschen. 

This e-mail and any attachments are confidential and intended solely for the addressee. The perusal, publication, copying or
dissemination of the contents of this e-mail by unauthorised third parties is prohibited. If you are not the intended recipient of this
e-mail, please delete it and immediately notify the sender.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3
  2012-12-12 18:49 Schneider, Roman
@ 2013-01-15  8:09 ` Artem Bityutskiy
  0 siblings, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2013-01-15  8:09 UTC (permalink / raw)
  To: Schneider, Roman; +Cc: linux-mtd@lists.infradead.org

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

On Wed, 2012-12-12 at 18:49 +0000, Schneider, Roman wrote:
>               ---
>        
>        NFC v3 (e.g. mx53) does also require to compress the id in case of 16Bit busw.
>        
>         drivers/mtd/nand/mxc_nand.c |   11 +++++++++++
>         1 files changed, 11 insertions(+), 0 deletions(-)

Hi, please, send a patch properly. Use git format-patch. Send it so that
I could save your e-mails and do 'git am roman-email.mbox'. First send
it to yourself and verify that works, and then when you find out how to
do this, send to the mailing list please. Thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3
@ 2013-01-15 15:56 Roman Schneider
  2013-01-17 10:55 ` Artem Bityutskiy
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Roman Schneider @ 2013-01-15 15:56 UTC (permalink / raw)
  To: linux-mtd; +Cc: Roman Schneider, Artem Bityutskiy

---
 Also compress the id in case of a v3 NAND flash controller (i.mx51, i.mx53)
 and 16Bit buswidth.

 drivers/mtd/nand/mxc_nand.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 45204e4..20e1241 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -530,12 +530,23 @@ static void send_page_v1(struct mtd_info *mtd, unsigned int ops)
 
 static void send_read_id_v3(struct mxc_nand_host *host)
 {
+	struct nand_chip *this = &host->nand;
+
 	/* Read ID into main buffer */
 	writel(NFC_ID, NFC_V3_LAUNCH);
 
 	wait_op_done(host, true);
 
 	memcpy32_fromio(host->data_buf, host->main_area0, 16);
+
+	if (this->options & NAND_BUSWIDTH_16) {
+		/* compress the ID info */
+		host->data_buf[1] = host->data_buf[2];
+		host->data_buf[2] = host->data_buf[4];
+		host->data_buf[3] = host->data_buf[6];
+		host->data_buf[4] = host->data_buf[8];
+		host->data_buf[5] = host->data_buf[10];
+	}
 }
 
 /* Request the NANDFC to perform a read of the NAND device ID. */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3
  2013-01-15 15:56 [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3 Roman Schneider
@ 2013-01-17 10:55 ` Artem Bityutskiy
  2013-01-17 10:59   ` Shawn Guo
  2013-01-17 11:16 ` Fabio Estevam
  2013-01-17 11:53 ` Artem Bityutskiy
  2 siblings, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2013-01-17 10:55 UTC (permalink / raw)
  To: Roman Schneider, Shawn Guo; +Cc: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

On Tue, 2013-01-15 at 16:56 +0100, Roman Schneider wrote:
> ---
>  Also compress the id in case of a v3 NAND flash controller (i.mx51, i.mx53)
>  and 16Bit buswidth.

Unfortunately I cannot compile-test it with the configuration I have.
This is not your fault, just a breakage in upstream. I'll wait when this
is fixed upstream, and then take a look at your patch. The breakage is:

arch/arm/mach-imx/built-in.o: In function `imx6q_restart':
platform-spi_imx.c:(.text+0x2220): undefined reference to `imx_src_prepare_restart'
arch/arm/mach-imx/built-in.o: In function `imx6q_pm_enter':
platform-spi_imx.c:(.text+0x22e4): undefined reference to `imx_set_cpu_jump'
arch/arm/mach-imx/built-in.o: In function `imx6q_init_irq':
platform-spi_imx.c:(.init.text+0x7280): undefined reference to `imx_src_init'
make[1]: *** [vmlinux] Error 1

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3
  2013-01-17 10:55 ` Artem Bityutskiy
@ 2013-01-17 10:59   ` Shawn Guo
  0 siblings, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2013-01-17 10:59 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: linux-mtd, Roman Schneider

On Thu, Jan 17, 2013 at 12:55:43PM +0200, Artem Bityutskiy wrote:
> On Tue, 2013-01-15 at 16:56 +0100, Roman Schneider wrote:
> > ---
> >  Also compress the id in case of a v3 NAND flash controller (i.mx51, i.mx53)
> >  and 16Bit buswidth.
> 
> Unfortunately I cannot compile-test it with the configuration I have.
> This is not your fault, just a breakage in upstream. I'll wait when this

It's my fault.  Please see if patch [1] fixes the problem with your
configuration.

Shawn

[1] http://article.gmane.org/gmane.linux.ports.arm.kernel/209206

> is fixed upstream, and then take a look at your patch. The breakage is:
> 
> arch/arm/mach-imx/built-in.o: In function `imx6q_restart':
> platform-spi_imx.c:(.text+0x2220): undefined reference to `imx_src_prepare_restart'
> arch/arm/mach-imx/built-in.o: In function `imx6q_pm_enter':
> platform-spi_imx.c:(.text+0x22e4): undefined reference to `imx_set_cpu_jump'
> arch/arm/mach-imx/built-in.o: In function `imx6q_init_irq':
> platform-spi_imx.c:(.init.text+0x7280): undefined reference to `imx_src_init'
> make[1]: *** [vmlinux] Error 1
> 
> -- 
> Best Regards,
> Artem Bityutskiy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3
  2013-01-15 15:56 [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3 Roman Schneider
  2013-01-17 10:55 ` Artem Bityutskiy
@ 2013-01-17 11:16 ` Fabio Estevam
  2013-01-17 11:53 ` Artem Bityutskiy
  2 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2013-01-17 11:16 UTC (permalink / raw)
  To: Roman Schneider; +Cc: linux-mtd, Artem Bityutskiy

Hi Roman,

On Tue, Jan 15, 2013 at 1:56 PM, Roman Schneider <schneider@at.festo.com> wrote:
> ---
>  Also compress the id in case of a v3 NAND flash controller (i.mx51, i.mx53)
>  and 16Bit buswidth.

This should go above the --- line.

You also missed a Signed-off-by line.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3
  2013-01-15 15:56 [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3 Roman Schneider
  2013-01-17 10:55 ` Artem Bityutskiy
  2013-01-17 11:16 ` Fabio Estevam
@ 2013-01-17 11:53 ` Artem Bityutskiy
  2 siblings, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2013-01-17 11:53 UTC (permalink / raw)
  To: Roman Schneider; +Cc: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

On Tue, 2013-01-15 at 16:56 +0100, Roman Schneider wrote:
> ---
>  Also compress the id in case of a v3 NAND flash controller (i.mx51, i.mx53)
>  and 16Bit buswidth.

OK, I fixed the commit message and added your S-o-b, just like Fabio
noted, and pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-17 11:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15 15:56 [PATCH] mtd: mxc_nand: compress ID info for send_read_id_v3 Roman Schneider
2013-01-17 10:55 ` Artem Bityutskiy
2013-01-17 10:59   ` Shawn Guo
2013-01-17 11:16 ` Fabio Estevam
2013-01-17 11:53 ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2012-12-12 18:49 Schneider, Roman
2013-01-15  8:09 ` Artem Bityutskiy

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.