From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH 1/3] spi: Add addr_width field to struct spi_message Date: Tue, 12 May 2015 10:11:47 +0200 Message-ID: References: <1431269253-22890-1-git-send-email-B48286@freescale.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-spi , Mark Brown , Hu Vincent To: Hou Zhiqiang Return-path: In-Reply-To: Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Hi Zhiqiang, On Tue, May 12, 2015 at 10:06 AM, Hou Zhiqiang w= rote: >> From: geert.uytterhoeven-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [mailto:geert.uytterhoeven@gmail.= com] >> On Behalf Of Geert Uytterhoeven >> Sent: 2015=E5=B9=B45=E6=9C=8811=E6=97=A5 15:43 >> To: Hou Zhiqiang-B48286 >> Cc: linux-spi; Mark Brown; Hu Mingkai-B21284 >> Subject: Re: [PATCH 1/3] spi: Add addr_width field to struct spi_mes= sage >> >> On Sun, May 10, 2015 at 4:47 PM, Zhiqiang Hou >> wrote: >> > From: Hou Zhiqiang >> > >> > Make SPI controller can get address width of the SPI device. >> >> What does "address wdith" mean? From your other patches, I infer it'= s >> either >> 24 or 32 bit addressing as used by nor-jedec ("m25p80"). >> Why does the generic spi_message needs to have nor-jedec-specific fi= elds? > > Yes, the address width is the address width of spi flash. > The reason to add this nor-jedec-specific field to spi_message is the= eSPI controller > of Freescale limits the MAX transaction length(TRANLEN) to 0x10000 ea= ch transaction, so if the > data size transferred exceed the TRANLEN, the eSPI controller can onl= y transfer data for > the first TRANLEN, and need to issue new write/read commands to compl= ete the remainders. > So, eSPI controller need getting the address width of spi flash, and = then calculate the > new address to initialize the new write/read commands. Shouldn't this be handled by the m25p80 driver instead? I see spi_master has a max_dma_len field. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-= m68k.org In personal conversations with technical people, I call myself a hacker= =2E But when I'm talking to journalists I just say "programmer" or something li= ke that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html