From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Mon, 7 Dec 2015 17:11:28 +0800 Subject: [U-Boot] [PATCH v5 2/3] cfi_flash: convert to driver model In-Reply-To: References: <1444289667-23775-1-git-send-email-thomas@wytron.com.tw> <1446883058-8321-1-git-send-email-thomas@wytron.com.tw> <1446883058-8321-2-git-send-email-thomas@wytron.com.tw> <56641DFD.1080004@wytron.com.tw> <566439B5.8000009@wytron.com.tw> Message-ID: <56654D40.8070908@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jagan, On 2015?12?06? 23:03, Jagan Teki wrote: > On 6 December 2015 at 19:05, Thomas Chou wrote: >> Hi Jagan, >> >> On 2015?12?06? 21:10, Jagan Teki wrote: >>>> >>>> This probing is not specific to CFI flash. It will probe all flash >>>> variants >>>> of MTD uclass. >>> >>> >>> This is something I'm unclear, suppose if I need to use MTD uclass in >>> spi-flash drivers shall I enable CONFIG_CFI_FLASH? If so that depends >>> on CONFIG_CFI_FLASH_DRIVER as well right? then it is not correct to >>> enable CFI_FLASH_DRIVER for other flash variants like spi-flash right? >> >> >> There is no need to select CFI_FLASH if there is no CFI flash. The probing >> here is only because we want to display the size of parallel flash in >> initr_flash() of board_r.c. > > So, this is the way drivers/mtd/altera_qspi.c getting probed? Yes. > >> >> Normally, devices are probed when they are used. You should be able to use >> "sf probe" for MTD uclass in the same way you do for SPI_FLASH uclass. > > True, suppose if I wanted to probe spi-flash MTD uclass drivers w/o > using "commands" like sf probe then I need to implement dm_scan node > logic on mtd-uclass.c correct? I am not sure whether the dm scan node should be on mtd uclass or specific drivers. Could you give more details? Best regards, Thomas