mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
regmap: mmio: Parse endianness definitions from DT
Since we changed to do formatting in the bus we now skip all the format parsing that the core does for its data marshalling code. This means that we skip the DT parsing it does which breaks some systems, we need to add an explict call in the MMIO code to do this. Reported-by: Alexander Stein <alexander.stein@systec-electronic.com> Tested-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
4f7d6dd4df
commit
0dbdb76c0c
1 changed files with 3 additions and 1 deletions
|
@ -23,6 +23,8 @@
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
|
#include "internal.h"
|
||||||
|
|
||||||
struct regmap_mmio_context {
|
struct regmap_mmio_context {
|
||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
unsigned val_bytes;
|
unsigned val_bytes;
|
||||||
|
@ -245,7 +247,7 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev,
|
||||||
ctx->val_bytes = config->val_bits / 8;
|
ctx->val_bytes = config->val_bits / 8;
|
||||||
ctx->clk = ERR_PTR(-ENODEV);
|
ctx->clk = ERR_PTR(-ENODEV);
|
||||||
|
|
||||||
switch (config->val_format_endian) {
|
switch (regmap_get_val_endian(dev, ®map_mmio, config)) {
|
||||||
case REGMAP_ENDIAN_DEFAULT:
|
case REGMAP_ENDIAN_DEFAULT:
|
||||||
case REGMAP_ENDIAN_LITTLE:
|
case REGMAP_ENDIAN_LITTLE:
|
||||||
#ifdef __LITTLE_ENDIAN
|
#ifdef __LITTLE_ENDIAN
|
||||||
|
|
Loading…
Reference in a new issue