From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Pringlemeir Date: Thu, 14 Aug 2014 10:26:12 -0400 Subject: [U-Boot] [PATCH 3/4] mtd: nand: add Freescale NFC driver In-Reply-To: <1407970493.7427.192.camel@snotra.buserror.net> (Scott Wood's message of "Wed, 13 Aug 2014 17:54:53 -0500") References: <4ea124ab817db6e3dee2067aadd6db14643990f5.1407312577.git.stefan@agner.ch> <1407796426.7427.100.camel@snotra.buserror.net> <1380dbe3110cbf9359220a78d69e1896@agner.ch> <1407881820.7427.137.camel@snotra.buserror.net> <87wqadl3h6.fsf@nbsps.com> <1407962492.7427.168.camel@snotra.buserror.net> <8761hwkqtq.fsf@nbsps.com> <1407970493.7427.192.camel@snotra.buserror.net> Message-ID: <871tsjkv0b.fsf@nbsps.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 13 Aug 2014, scottwood at freescale.com wrote: > On Wed, 2014-08-13 at 17:44 -0400, Bill Pringlemeir wrote: >> Regarding "can't know in advance", I think that some of the register >> values maybe set by the boot rom. This might make more sense for >> Linux than U-Boot. However, after the initial configuration, many do >> need the 'read/modify/write' as there are many bit fields with >> different functionality. > If the register is only modified by software, and not asynchronously > by hardware, then you could read the value once when the driver > starts, and cache its value to avoid a reportedly expensive I/O access > every time you need to modify it. Yes, that is a good point. The regmap interface could be used in the Linux kernel. I don't see any infrastructure like that in U-Boot? It is fairly simple to re-invent as this driver only needs the flat structure. Regards, Bill Pringlemeir.