From: Greg Kroah-Hartman Date: Mon, 4 May 2020 15:25:02 +0000 (+0200) Subject: drop queue-4.4/asoc-fsl_ssi-remove-explicit-register-defaults.patch X-Git-Tag: v4.4.222~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b99a0f8fdd3ce8c8902a706e11afad14f7fd9001;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-4.4/asoc-fsl_ssi-remove-explicit-register-defaults.patch --- diff --git a/queue-4.4/asoc-fsl_ssi-remove-explicit-register-defaults.patch b/queue-4.4/asoc-fsl_ssi-remove-explicit-register-defaults.patch deleted file mode 100644 index c46999de396..00000000000 --- a/queue-4.4/asoc-fsl_ssi-remove-explicit-register-defaults.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 5c408fee254633a5be69505bc86c6b034f871ab4 Mon Sep 17 00:00:00 2001 -From: "Maciej S. Szmigiero" -Date: Mon, 18 Jan 2016 20:07:44 +0100 -Subject: ASoC: fsl_ssi: remove explicit register defaults - -From: Maciej S. Szmigiero - -commit 5c408fee254633a5be69505bc86c6b034f871ab4 upstream. - -There is no guarantee that on fsl_ssi module load -SSI registers will have their power-on-reset values. - -In fact, if the driver is reloaded the values in -registers will be whatever they were set to previously. - -However, the cache needs to be fully populated at probe -time to avoid non-atomic allocations during register -access. - -Special case here is imx21-class SSI, since -according to datasheet it don't have SACC{ST,EN,DIS} -regs. - -This fixes hard lockup on fsl_ssi module reload, -at least in AC'97 mode. - -Fixes: 05cf237972fe ("ASoC: fsl_ssi: Add driver suspend and resume to support MEGA Fast") -Signed-off-by: Maciej S. Szmigiero -Tested-by: Fabio Estevam -Signed-off-by: Mark Brown -Signed-off-by: Greg Kroah-Hartman - ---- - sound/soc/fsl/fsl_ssi.c | 42 ++++++++++++++++++++++-------------------- - 1 file changed, 22 insertions(+), 20 deletions(-) - ---- a/sound/soc/fsl/fsl_ssi.c -+++ b/sound/soc/fsl/fsl_ssi.c -@@ -112,20 +112,6 @@ struct fsl_ssi_rxtx_reg_val { - struct fsl_ssi_reg_val tx; - }; - --static const struct reg_default fsl_ssi_reg_defaults[] = { -- {0x10, 0x00000000}, -- {0x18, 0x00003003}, -- {0x1c, 0x00000200}, -- {0x20, 0x00000200}, -- {0x24, 0x00040000}, -- {0x28, 0x00040000}, -- {0x38, 0x00000000}, -- {0x48, 0x00000000}, -- {0x4c, 0x00000000}, -- {0x54, 0x00000000}, -- {0x58, 0x00000000}, --}; -- - static bool fsl_ssi_readable_reg(struct device *dev, unsigned int reg) - { - switch (reg) { -@@ -174,8 +160,7 @@ static const struct regmap_config fsl_ss - .val_bits = 32, - .reg_stride = 4, - .val_format_endian = REGMAP_ENDIAN_NATIVE, -- .reg_defaults = fsl_ssi_reg_defaults, -- .num_reg_defaults = ARRAY_SIZE(fsl_ssi_reg_defaults), -+ .num_reg_defaults_raw = CCSR_SSI_SACCDIS / sizeof(uint32_t) + 1, - .readable_reg = fsl_ssi_readable_reg, - .volatile_reg = fsl_ssi_volatile_reg, - .writeable_reg = fsl_ssi_writeable_reg, -@@ -184,6 +169,7 @@ static const struct regmap_config fsl_ss - - struct fsl_ssi_soc_data { - bool imx; -+ bool imx21regs; /* imx21-class SSI - no SACC{ST,EN,DIS} regs */ - bool offline_config; - u32 sisr_write_mask; - }; -@@ -285,6 +271,7 @@ static struct fsl_ssi_soc_data fsl_ssi_m - - static struct fsl_ssi_soc_data fsl_ssi_imx21 = { - .imx = true, -+ .imx21regs = true, - .offline_config = true, - .sisr_write_mask = 0, - }; -@@ -568,8 +555,12 @@ static void fsl_ssi_setup_ac97(struct fs - */ - regmap_write(regs, CCSR_SSI_SACNT, - CCSR_SSI_SACNT_AC97EN | CCSR_SSI_SACNT_FV); -- regmap_write(regs, CCSR_SSI_SACCDIS, 0xff); -- regmap_write(regs, CCSR_SSI_SACCEN, 0x300); -+ -+ /* no SACC{ST,EN,DIS} regs on imx21-class SSI */ -+ if (!ssi_private->soc->imx21regs) { -+ regmap_write(regs, CCSR_SSI_SACCDIS, 0xff); -+ regmap_write(regs, CCSR_SSI_SACCEN, 0x300); -+ } - - /* - * Enable SSI, Transmit and Receive. AC97 has to communicate with the -@@ -1381,6 +1372,7 @@ static int fsl_ssi_probe(struct platform - struct resource *res; - void __iomem *iomem; - char name[64]; -+ struct regmap_config regconfig = fsl_ssi_regconfig; - - of_id = of_match_device(fsl_ssi_ids, &pdev->dev); - if (!of_id || !of_id->data) -@@ -1422,15 +1414,25 @@ static int fsl_ssi_probe(struct platform - return PTR_ERR(iomem); - ssi_private->ssi_phys = res->start; - -+ if (ssi_private->soc->imx21regs) { -+ /* -+ * According to datasheet imx21-class SSI -+ * don't have SACC{ST,EN,DIS} regs. -+ */ -+ regconfig.max_register = CCSR_SSI_SRMSK; -+ regconfig.num_reg_defaults_raw = -+ CCSR_SSI_SRMSK / sizeof(uint32_t) + 1; -+ } -+ - ret = of_property_match_string(np, "clock-names", "ipg"); - if (ret < 0) { - ssi_private->has_ipg_clk_name = false; - ssi_private->regs = devm_regmap_init_mmio(&pdev->dev, iomem, -- &fsl_ssi_regconfig); -+ ®config); - } else { - ssi_private->has_ipg_clk_name = true; - ssi_private->regs = devm_regmap_init_mmio_clk(&pdev->dev, -- "ipg", iomem, &fsl_ssi_regconfig); -+ "ipg", iomem, ®config); - } - if (IS_ERR(ssi_private->regs)) { - dev_err(&pdev->dev, "Failed to init register map\n"); diff --git a/queue-4.4/series b/queue-4.4/series index 3fcf67c1a53..fb4088a775e 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -14,4 +14,3 @@ perf-x86-fix-uninitialized-value-usage.patch exynos4-is-fix-a-format-string-bug.patch asoc-wm8960-fix-wm8960_sysclk_pll-mode.patch asoc-imx-spdif-fix-crash-on-suspend.patch -asoc-fsl_ssi-remove-explicit-register-defaults.patch