From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Brezillon Date: Thu, 13 Dec 2018 00:55:14 +0100 Subject: [U-Boot] [PATCH 03/16] spi: Add non DM version of SPI_MEM In-Reply-To: References: <20181212173228.12281-1-vigneshr@ti.com> <20181212173228.12281-4-vigneshr@ti.com> <20181212214035.43b825b3@bbrezillon> <20181212220205.4ad00b36@bbrezillon> <20181212222508.5c79d762@bbrezillon> Message-ID: <20181213005514.3b9de371@bbrezillon> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 13 Dec 2018 04:40:30 +0530 Jagan Teki wrote: > > I do really understand your intention about the real question. > - Any code or generic code will add in U-Boot should be driver-model > driven, are you agree this point? > Yes- thanks. > No - we need to have separate discussion. Depends on what you mean by driver-model driven. Yes, applying the DM sometimes makes sense, but blindly trying to push it everywhere just for the sake of being "DM compliant" is a huge mistake IMO. One example of the thing you suggested which didn't make sense at all: force MTD users to manipulate udevice objects instead of mtd_info ones. > > Any code that related to spi, or spi-flash should be driver-model > driven, ie what my AIM as a Maintainer (ie only reason for my spi-nor > changes resist for long time to fit). You seem to use the term "driver-model" a lot without clearly explaining what you have in mind. The driver-model should be used where it makes sense, but some of your suggestions don't make any sense to me. Like the proposal to add a SPI NOR uclass while we already have an MTD uclass which works just fine for all kind of flash devices. Oh, and this strict rule that says "don't provide wrappers to handle non-DM compliant cases" is just wrong. As I said, none of these dummy wrappers prevent you from enforcing DM_SPI conversion, and it allows us to support existing HW while getting rid of the old code base. Plus, I suggested to declare the spi-nor driver as an MTD uclass so it's not like we're completely ignoring your comments :P.