diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-01 18:27:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-01 18:27:08 -0400 |
commit | fbae5cbb43512446ba15a3b90039cb127d22ee95 (patch) | |
tree | 29f539576bc46537d7013d0ec0f4c2082dbca278 /sound | |
parent | 6f888fe31dfcda4cb25018b0af3f50049fcf0b7f (diff) | |
parent | 4756f881ba303e4dada613feeacf44d26c3e35b9 (diff) |
Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform updates from Olof Johansson:
"Improved and new platform support for various SoCs:
New SoC support:
- Broadcom BCM23550
- Freescale i.MX7Solo
- Qualcomm MDM9615
- Renesas r8a7792
Improvements:
- convert clps711x to multiplatform
- debug uart improvements for Atmel platforms
- Tango platform improvements: HOTPLUG_CPU, Suspend-to-ram
- OMAP tweaks and improvements to hwmod
- OMAP support for kexec on SMP"
* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (109 commits)
ARM: davinci: fix build break because of undeclared dm365_evm_snd_data
ARM: s3c64xx: smartq: Avoid sparse warnings
ARM: sti: Implement dummy L2 cache's write_sec
ARM: STi: Update machine _namestr to be more generic.
arm: meson: explicitly select clk drivers
ARM: tango: add Suspend-to-RAM support
ARM: hisi: consolidate the hisilicon machine entries
ARM: tango: fix CONFIG_HOTPLUG_CPU=n build
MAINTAINERS: Update BCM281XX/BCM11XXX/BCM216XX entry
MAINTAINERS: Update BCM63XX entry
MAINTAINERS: Add NS2 entry
MAINTAINERS: Fix nsp false-positives
MAINTAINERS: Change L to M for Broadcom ARM/ARM64 SoC entries
ARM: debug: Enable DEBUG_BCM_5301X for Northstar Plus SoCs
ARM: clps711x: Switch to MULTIPLATFORM
ARM: clps711x: Remove boards support
ARM: clps711x: Add basic DT support
ARM: clps711x: Reduce static map size
ARM: SAMSUNG: Constify iomem address passed to s5p_init_cpu
ARM: oxnas: Change OX810SE default driver config
...
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/mcbsp.c | 21 | ||||
-rw-r--r-- | sound/soc/omap/mcbsp.h | 3 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 5 |
3 files changed, 21 insertions, 8 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index 4a16e778966b..76ce33199bf9 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c | |||
@@ -257,8 +257,8 @@ static void omap_st_on(struct omap_mcbsp *mcbsp) | |||
257 | { | 257 | { |
258 | unsigned int w; | 258 | unsigned int w; |
259 | 259 | ||
260 | if (mcbsp->pdata->enable_st_clock) | 260 | if (mcbsp->pdata->force_ick_on) |
261 | mcbsp->pdata->enable_st_clock(mcbsp->id, 1); | 261 | mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, true); |
262 | 262 | ||
263 | /* Disable Sidetone clock auto-gating for normal operation */ | 263 | /* Disable Sidetone clock auto-gating for normal operation */ |
264 | w = MCBSP_ST_READ(mcbsp, SYSCONFIG); | 264 | w = MCBSP_ST_READ(mcbsp, SYSCONFIG); |
@@ -287,8 +287,8 @@ static void omap_st_off(struct omap_mcbsp *mcbsp) | |||
287 | w = MCBSP_ST_READ(mcbsp, SYSCONFIG); | 287 | w = MCBSP_ST_READ(mcbsp, SYSCONFIG); |
288 | MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE); | 288 | MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE); |
289 | 289 | ||
290 | if (mcbsp->pdata->enable_st_clock) | 290 | if (mcbsp->pdata->force_ick_on) |
291 | mcbsp->pdata->enable_st_clock(mcbsp->id, 0); | 291 | mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, false); |
292 | } | 292 | } |
293 | 293 | ||
294 | static void omap_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir) | 294 | static void omap_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir) |
@@ -946,6 +946,13 @@ static int omap_st_add(struct omap_mcbsp *mcbsp, struct resource *res) | |||
946 | if (!st_data) | 946 | if (!st_data) |
947 | return -ENOMEM; | 947 | return -ENOMEM; |
948 | 948 | ||
949 | st_data->mcbsp_iclk = clk_get(mcbsp->dev, "ick"); | ||
950 | if (IS_ERR(st_data->mcbsp_iclk)) { | ||
951 | dev_warn(mcbsp->dev, | ||
952 | "Failed to get ick, sidetone might be broken\n"); | ||
953 | st_data->mcbsp_iclk = NULL; | ||
954 | } | ||
955 | |||
949 | st_data->io_base_st = devm_ioremap(mcbsp->dev, res->start, | 956 | st_data->io_base_st = devm_ioremap(mcbsp->dev, res->start, |
950 | resource_size(res)); | 957 | resource_size(res)); |
951 | if (!st_data->io_base_st) | 958 | if (!st_data->io_base_st) |
@@ -1088,11 +1095,13 @@ err_thres: | |||
1088 | return ret; | 1095 | return ret; |
1089 | } | 1096 | } |
1090 | 1097 | ||
1091 | void omap_mcbsp_sysfs_remove(struct omap_mcbsp *mcbsp) | 1098 | void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp) |
1092 | { | 1099 | { |
1093 | if (mcbsp->pdata->buffer_size) | 1100 | if (mcbsp->pdata->buffer_size) |
1094 | sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group); | 1101 | sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group); |
1095 | 1102 | ||
1096 | if (mcbsp->st_data) | 1103 | if (mcbsp->st_data) { |
1097 | sysfs_remove_group(&mcbsp->dev->kobj, &sidetone_attr_group); | 1104 | sysfs_remove_group(&mcbsp->dev->kobj, &sidetone_attr_group); |
1105 | clk_put(mcbsp->st_data->mcbsp_iclk); | ||
1106 | } | ||
1098 | } | 1107 | } |
diff --git a/sound/soc/omap/mcbsp.h b/sound/soc/omap/mcbsp.h index 96d1b086bcf8..61e93b1c185d 100644 --- a/sound/soc/omap/mcbsp.h +++ b/sound/soc/omap/mcbsp.h | |||
@@ -280,6 +280,7 @@ struct omap_mcbsp_reg_cfg { | |||
280 | 280 | ||
281 | struct omap_mcbsp_st_data { | 281 | struct omap_mcbsp_st_data { |
282 | void __iomem *io_base_st; | 282 | void __iomem *io_base_st; |
283 | struct clk *mcbsp_iclk; | ||
283 | bool running; | 284 | bool running; |
284 | bool enabled; | 285 | bool enabled; |
285 | s16 taps[128]; /* Sidetone filter coefficients */ | 286 | s16 taps[128]; /* Sidetone filter coefficients */ |
@@ -349,6 +350,6 @@ int omap_st_disable(struct omap_mcbsp *mcbsp); | |||
349 | int omap_st_is_enabled(struct omap_mcbsp *mcbsp); | 350 | int omap_st_is_enabled(struct omap_mcbsp *mcbsp); |
350 | 351 | ||
351 | int omap_mcbsp_init(struct platform_device *pdev); | 352 | int omap_mcbsp_init(struct platform_device *pdev); |
352 | void omap_mcbsp_sysfs_remove(struct omap_mcbsp *mcbsp); | 353 | void omap_mcbsp_cleanup(struct omap_mcbsp *mcbsp); |
353 | 354 | ||
354 | #endif /* __ASOC_MCBSP_H */ | 355 | #endif /* __ASOC_MCBSP_H */ |
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index fd99d89de6a8..d018e966e533 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -788,6 +788,7 @@ static int asoc_mcbsp_probe(struct platform_device *pdev) | |||
788 | match = of_match_device(omap_mcbsp_of_match, &pdev->dev); | 788 | match = of_match_device(omap_mcbsp_of_match, &pdev->dev); |
789 | if (match) { | 789 | if (match) { |
790 | struct device_node *node = pdev->dev.of_node; | 790 | struct device_node *node = pdev->dev.of_node; |
791 | struct omap_mcbsp_platform_data *pdata_quirk = pdata; | ||
791 | int buffer_size; | 792 | int buffer_size; |
792 | 793 | ||
793 | pdata = devm_kzalloc(&pdev->dev, | 794 | pdata = devm_kzalloc(&pdev->dev, |
@@ -799,6 +800,8 @@ static int asoc_mcbsp_probe(struct platform_device *pdev) | |||
799 | memcpy(pdata, match->data, sizeof(*pdata)); | 800 | memcpy(pdata, match->data, sizeof(*pdata)); |
800 | if (!of_property_read_u32(node, "ti,buffer-size", &buffer_size)) | 801 | if (!of_property_read_u32(node, "ti,buffer-size", &buffer_size)) |
801 | pdata->buffer_size = buffer_size; | 802 | pdata->buffer_size = buffer_size; |
803 | if (pdata_quirk) | ||
804 | pdata->force_ick_on = pdata_quirk->force_ick_on; | ||
802 | } else if (!pdata) { | 805 | } else if (!pdata) { |
803 | dev_err(&pdev->dev, "missing platform data.\n"); | 806 | dev_err(&pdev->dev, "missing platform data.\n"); |
804 | return -EINVAL; | 807 | return -EINVAL; |
@@ -832,7 +835,7 @@ static int asoc_mcbsp_remove(struct platform_device *pdev) | |||
832 | if (mcbsp->pdata->ops && mcbsp->pdata->ops->free) | 835 | if (mcbsp->pdata->ops && mcbsp->pdata->ops->free) |
833 | mcbsp->pdata->ops->free(mcbsp->id); | 836 | mcbsp->pdata->ops->free(mcbsp->id); |
834 | 837 | ||
835 | omap_mcbsp_sysfs_remove(mcbsp); | 838 | omap_mcbsp_cleanup(mcbsp); |
836 | 839 | ||
837 | clk_put(mcbsp->fclk); | 840 | clk_put(mcbsp->fclk); |
838 | 841 | ||