Skip to content
Snippets Groups Projects
Commit 396f7f91 authored by Davide Cardillo's avatar Davide Cardillo
Browse files

[i.MX6][drivers/bus/imx-weim.c] Add WCR property of WEIM BUS

The original driver does not manage WCR, one of the parameter of the WEIM bus.
Now the WCR can be set via device-tree.
parent ac54dc82
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,8 @@
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
#include <linux/regmap.h>
#define WCR_REG_OFFSET 0x90
struct imx_weim_devtype {
unsigned int cs_count;
unsigned int cs_regs_count;
......@@ -131,7 +133,7 @@ static int weim_timing_setup(struct device *dev,
const struct imx_weim_devtype *devtype,
struct cs_timing_state *ts)
{
u32 cs_idx, value[MAX_CS_REGS_COUNT];
u32 cs_idx, value[MAX_CS_REGS_COUNT], wcr;
int i, ret;
int reg_idx, num_regs;
struct cs_timing *cst;
......@@ -184,6 +186,12 @@ static int weim_timing_setup(struct device *dev,
}
}
ret = of_property_read_u32 (np, "fsl,weim-wcr", &wcr);
if ( ret )
return ret;
writel(wcr, base + WCR_REG_OFFSET);
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment