Re: [1/2] mfd: syscon: Support native-endian regmaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 14, 2016 at 10:17:31AM +0100, Paul Burton wrote:
> The regmap devicetree binding documentation states that a native-endian
> property should be supported as well as big-endian & little-endian,
> however syscon in its duplication of the parsing of these properties
> omits support for native-endian. Fix this by setting
> REGMAP_ENDIAN_NATIVE when a native-endian property is found.
> 
> Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx>
> Cc: Lee Jones <lee.jones@xxxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
> Cc: linux-mips@xxxxxxxxxxxxxx

Needed for 'MIPS: malta: Fixup reboot' to work.

Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Makes me wonder though how the other syscon nodes already using 
'native-endian' work.

Thanks,
Guenter

> ---
>  drivers/mfd/syscon.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index 2f2225e..b93fe4c 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -73,8 +73,10 @@ static struct syscon *of_syscon_register(struct device_node *np)
>  	/* Parse the device's DT node for an endianness specification */
>  	if (of_property_read_bool(np, "big-endian"))
>  		syscon_config.val_format_endian = REGMAP_ENDIAN_BIG;
> -	 else if (of_property_read_bool(np, "little-endian"))
> +	else if (of_property_read_bool(np, "little-endian"))
>  		syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
> +	else if (of_property_read_bool(np, "native-endian"))
> +		syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE;
>  
>  	/*
>  	 * search for reg-io-width property in DT. If it is not provided,




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux