From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sat, 8 Sep 2018 19:06:34 -0600 Subject: [U-Boot] [PATCH v2 2/5] x86: tangier: pinmux: add API to configure protected pins In-Reply-To: <20180905154429.GA5341@softcrasher> References: <1536071645-25229-1-git-send-email-georgii.staroselskii@emlid.com> <1536071645-25229-3-git-send-email-georgii.staroselskii@emlid.com> <20180905154429.GA5341@softcrasher> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Georgii, On 5 September 2018 at 09:44, Georgii Staroselskii wrote: > > On Wed, Sep 05, 2018 at 09:24:40AM -0600, Simon Glass wrote: > > Hi Georgi, > > > > On 4 September 2018 at 07:34, Georgii Staroselskii > > wrote: > > > This API is going to be used to configure some pins that are protected > > > for simple modification. > > > > > > It's not a comprehensive pinctrl driver but can be turned into one > > > when we need this in the future. Now it is planned to be used only > > > in one place. So that's why I decided not to pollute the codebase with a > > > full-blown pinctrl-merrifield nobody will use. > > > > > > This driver reads corresponding fields in DT and configures pins > > > accordingly. > > > > > > The "protected" flag is used to distinguish configuration of SCU-owned > > > pins from the ordinary ones. > > > > > > The code has been adapted from Linux work done by Andy Shevchenko > > > in pinctrl-merrfifield.c > > > > > > Signed-off-by: Georgii Staroselskii > > > --- > > > arch/x86/cpu/tangier/Makefile | 2 +- > > > arch/x86/cpu/tangier/pinmux.c | 196 ++++++++++++++++++++++++++++++++++++++++++ > > > 2 files changed, 197 insertions(+), 1 deletion(-) > > > create mode 100644 arch/x86/cpu/tangier/pinmux.c > > > > > > > Please can you use the livetree API (dev_read_...)? > > > > Regards, > > Simon > > Sure. Will do. It will need CONFIG_OF_LIVE=y for edison_defconfig to be > set. Is there any other modifications or possible regressions that I need > to take into account? Or if I just stick to doc/driver-model/livetree.txt > things should go smoothly? We lack unit tests in the code - currently it is tested by the standard sandbox driver-model tests. which run in flat-tree and live-tree versions. I did hit a problem recently, so be a little suspicious. But normally it is transparent. Note that flat-tree is used before relocation and in SPL, regardless of the setting of CONFIG_OF_LIVE. You don't really need to enable OF_LIVE if you don't want to. That is actually a separate thing from which API you use. Regards, Simon