[U-Boot] [PATCH v2 32/56] rockchip: pinctrl: rk3368: move IOMUX bit-definitions to pinctrl driver

Dr. Philipp Tomsich philipp.tomsich at theobroma-systems.com
Fri Jul 28 08:51:03 UTC 2017


> On 28 Jul 2017, at 05:38, Simon Glass <sjg at chromium.org> wrote:
> 
> On 26 July 2017 at 04:40, Philipp Tomsich
> <philipp.tomsich at theobroma-systems.com> wrote:
>> There is no real reason to keep the bit-definitions for the IOMUX in
>> the grf header file (which defines the register layout of the GRF block):
>> these should only be used by our pinctrl driver (with the possible
>> exception of early debug-init code in TPL/SPL).
>> 
>> This moves the relevant definitions from the grf_rk3368.h header
>> into the pinctrl driver pinctrl_rk3368.c.
>> 
>> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
>> 
>> - moved bit-definitions pertinent to pinctrl (i.e. the various IOMUX
>>  definitions) to the rk3368 pinctrl driver implementation
>> 
>> ---
>> 
>> Changes in v2: None
>> 
>> arch/arm/include/asm/arch-rockchip/grf_rk3368.h | 316 -----------------------
>> drivers/pinctrl/rockchip/pinctrl_rk3368.c       | 325 ++++++++++++++++++++++++
>> 2 files changed, 325 insertions(+), 316 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> (although I expect that we will reinstate the SHIFT macros?)

This is something we’ll need to discuss.

In fact, I was hoping that we could redo the IOMUX support for
the growing number of devices to reduce the amount of code
duplication and to use tables of pin-location/-function.

The current state is untenable for the long run, as we duplicate
not just the GPIO0B1_MASK on every chip, but even have
GPIO0A1_MASK, GPIO0B1_MASK, … all refer to the same
value.

I haven’t fully sketched out how I want this to look, but it’s on my
list for the final release of the year.

—Philipp.



More information about the U-Boot mailing list