From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Fri, 11 Mar 2016 00:08:20 +0530 Subject: [U-Boot] [RESEND 1/2] stm32: stm32f4: move flash driver to mtd driver location In-Reply-To: <1E25CFEBFF5B6D40BBC7682080D80524380A276399@SAFEX1MAIL5.st.com> References: <1457565497-9822-1-git-send-email-vikas.manocha@st.com> <56E0E185.3060709@openedev.com> <9B6E6443-7AC3-4650-8885-CB3B1A1C79FD@st.com> <6b6ce923f1664b2591fe74f121e44dfc@openedev.com> <1E25CFEBFF5B6D40BBC7682080D80524380A276395@SAFEX1MAIL5.st.com> <56E1B2E9.9030904@openedev.com> <1E25CFEBFF5B6D40BBC7682080D80524380A276398@SAFEX1MAIL5.st.com> <56E1B5C0.5070001@openedev.com> <1E25CFEBFF5B6D40BBC7682080D80524380A276399@SAFEX1MAIL5.st.com> Message-ID: <56E1BF1C.1090002@openedev.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 10 March 2016 11:47 PM, Vikas MANOCHA wrote: > Hi Jagan, > >> -----Original Message----- >> From: Jagan Teki [mailto:jteki at openedev.com] >> Sent: Thursday, March 10, 2016 9:58 AM >> To: Vikas MANOCHA >> Cc: u-boot at lists.denx.de; Albert Aribaud; Antonio Borneo; Heiko Schocher; >> Kamil Lulko; Matt Porter; rev13 at wp.pl; Scott Wood; Simon Glass; Stefan >> Roese; Thomas Chou; Vadzim Dambrouski >> Subject: Re: [RESEND 1/2] stm32: stm32f4: move flash driver to mtd driver >> location >> >> On Thursday 10 March 2016 11:22 PM, Vikas MANOCHA wrote: >>> Hi, >>> >>>> -----Original Message----- >>>> From: Jagan Teki [mailto:jteki at openedev.com] >>>> Sent: Thursday, March 10, 2016 9:46 AM >>>> To: Vikas MANOCHA >>>> Cc: u-boot at lists.denx.de; Albert Aribaud; Antonio Borneo; Heiko >>>> Schocher; Kamil Lulko; Matt Porter; rev13 at wp.pl; Scott Wood; Simon >>>> Glass; Stefan Roese; Thomas Chou; Vadzim Dambrouski >>>> Subject: Re: [RESEND 1/2] stm32: stm32f4: move flash driver to mtd >>>> driver location >>>> >>>> On Thursday 10 March 2016 11:11 PM, Vikas MANOCHA wrote: >>>>> Hi Jagan, >>>>> >>>>>> -----Original Message----- >>>>>> From: jteki at openedev.com [mailto:jteki at openedev.com] >>>>>> Sent: Wednesday, March 09, 2016 9:02 PM >>>>>> To: Vikas MANOCHA >>>>>> Cc: u-boot at lists.denx.de; Albert Aribaud; Antonio Borneo; Heiko >>>>>> Schocher; Kamil Lulko; Matt Porter; rev13 at wp.pl; Scott Wood; Simon >>>>>> Glass; Stefan Roese; Thomas Chou; Vadzim Dambrouski >>>>>> Subject: Re: [RESEND 1/2] stm32: stm32f4: move flash driver to mtd >>>>>> driver location >>>>>> >>>>>> On 2016-03-09 23:18, Vikas MANOCHA wrote: >>>>>>> Hi Jagan , >>>>>>> >>>>>>>> On Mar 9, 2016, at 6:53 PM, Jagan Teki >> wrote: >>>>>>>> >>>>>>>>> On Thursday 10 March 2016 04:48 AM, Vikas Manocha wrote: >>>>>>>>> Same flash driver can be used by other stm32 families like stm32f7. >>>>>>>>> Better place for this driver would be mtd driver location. >>>>>>>> >>>>>>>> What kind of flash is it, parallel or serial NOR? >>>>>>> >>>>>>> It is embedded 256 bit NOR flash. >>>>>> >>>>>> OK, I thought it's similar to SST25L. >>>>>> >>>>>> Can't we detect this through cfi_flash framework? >>>>> >>>>> No, it is not possible. >>>> >>>> Sorry, please add some details why it couldn't? >>> >>> The embedded flash in stm32 is not cfi flash. Cfi tables to find the flash >> characteristics are not implemented. >> >> OK, all your saying that this not quite exactly a cfi, different kind wrt sst32. >> true? > > Yes, flash is embedded in the stm32 micro & details like data width etc are not relevant for the user. > Sst32 ? , sorry but I am not aware of it and sst32L. > >> then please convert this into MTD driver model format. >> >> If needed take an example of existing MTD uclass driver. > > Can you please point me to it ? The board your using with this driver has fdt and dm support? If so, it is quite straight forward, take an example of this drivers/mtd/altera_qspi.c - register with MTD_UCLASS - add your erase/write and read ops through mtd_ops