diff options
author | Xiubo Li <Li.Xiubo@freescale.com> | 2014-08-24 23:31:02 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-27 14:19:29 -0400 |
commit | 014fd22ef9c6a7e9536b7e16635714a1a34810a8 (patch) | |
tree | b3b74ed97784541fce9ee9249dc44ed6f0658c64 | |
parent | 664915074e750614c5d140093d5098a165a24e3d (diff) |
ASoC: fsl-sai: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/sound/fsl-sai.txt | 7 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_sai.c | 6 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_sai.h | 1 |
3 files changed, 4 insertions, 10 deletions
diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt index 0f4e23828190..5f239b8bcddd 100644 --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt | |||
@@ -18,9 +18,8 @@ Required properties: | |||
18 | - pinctrl-names: Must contain a "default" entry. | 18 | - pinctrl-names: Must contain a "default" entry. |
19 | - pinctrl-NNN: One property must exist for each entry in pinctrl-names. | 19 | - pinctrl-NNN: One property must exist for each entry in pinctrl-names. |
20 | See ../pinctrl/pinctrl-bindings.txt for details of the property values. | 20 | See ../pinctrl/pinctrl-bindings.txt for details of the property values. |
21 | - big-endian-regs: If this property is absent, the little endian mode will | 21 | - big-endian: Boolean property, required if all the FTM_PWM registers |
22 | be in use as default, or the big endian mode will be in use for all the | 22 | are big-endian rather than little-endian. |
23 | device registers. | ||
24 | - big-endian-data: If this property is absent, the little endian mode will | 23 | - big-endian-data: If this property is absent, the little endian mode will |
25 | be in use as default, or the big endian mode will be in use for all the | 24 | be in use as default, or the big endian mode will be in use for all the |
26 | fifo data. | 25 | fifo data. |
@@ -38,6 +37,6 @@ sai2: sai@40031000 { | |||
38 | dma-names = "tx", "rx"; | 37 | dma-names = "tx", "rx"; |
39 | dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>, | 38 | dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>, |
40 | <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>; | 39 | <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>; |
41 | big-endian-regs; | 40 | big-endian; |
42 | big-endian-data; | 41 | big-endian-data; |
43 | }; | 42 | }; |
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index faa049797897..52d1e9982639 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c | |||
@@ -539,7 +539,7 @@ static bool fsl_sai_writeable_reg(struct device *dev, unsigned int reg) | |||
539 | } | 539 | } |
540 | } | 540 | } |
541 | 541 | ||
542 | static struct regmap_config fsl_sai_regmap_config = { | 542 | static const struct regmap_config fsl_sai_regmap_config = { |
543 | .reg_bits = 32, | 543 | .reg_bits = 32, |
544 | .reg_stride = 4, | 544 | .reg_stride = 4, |
545 | .val_bits = 32, | 545 | .val_bits = 32, |
@@ -568,10 +568,6 @@ static int fsl_sai_probe(struct platform_device *pdev) | |||
568 | if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai")) | 568 | if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai")) |
569 | sai->sai_on_imx = true; | 569 | sai->sai_on_imx = true; |
570 | 570 | ||
571 | sai->big_endian_regs = of_property_read_bool(np, "big-endian-regs"); | ||
572 | if (sai->big_endian_regs) | ||
573 | fsl_sai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG; | ||
574 | |||
575 | sai->big_endian_data = of_property_read_bool(np, "big-endian-data"); | 571 | sai->big_endian_data = of_property_read_bool(np, "big-endian-data"); |
576 | 572 | ||
577 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 573 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h index 0e6c9f595d75..20e3e53ce6ea 100644 --- a/sound/soc/fsl/fsl_sai.h +++ b/sound/soc/fsl/fsl_sai.h | |||
@@ -131,7 +131,6 @@ struct fsl_sai { | |||
131 | struct clk *bus_clk; | 131 | struct clk *bus_clk; |
132 | struct clk *mclk_clk[FSL_SAI_MCLK_MAX]; | 132 | struct clk *mclk_clk[FSL_SAI_MCLK_MAX]; |
133 | 133 | ||
134 | bool big_endian_regs; | ||
135 | bool big_endian_data; | 134 | bool big_endian_data; |
136 | bool is_dsp_mode; | 135 | bool is_dsp_mode; |
137 | bool sai_on_imx; | 136 | bool sai_on_imx; |